If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Find out what Form DataMode is?
I have a form that has an "On Open" event and the problem with the event is
that when the form is opened with DataMode=acFormEdit I get a run-time error '2448': "You can't assign a value to this object". The "On Open" Event works fine with DataMode=acFormAdd. I am wondering if there is a way to check the DataMode when an form is opened so that I can separate out the code that is giving me the problems to only run when DataMode=acFormAdd? |
#2
|
|||
|
|||
Find out what Form DataMode is?
You can check the value of the DataEntry property.
If you open a form with acFormEdit, it will be False If you open a form with acFormAdd, it will be True So If Me.DataEntry = True Then 'Do stuff form acFormAdd Else 'Do stuff for acFormEdit End If -- Dave Hargis, Microsoft Access MVP "jutlaux" wrote: I have a form that has an "On Open" event and the problem with the event is that when the form is opened with DataMode=acFormEdit I get a run-time error '2448': "You can't assign a value to this object". The "On Open" Event works fine with DataMode=acFormAdd. I am wondering if there is a way to check the DataMode when an form is opened so that I can separate out the code that is giving me the problems to only run when DataMode=acFormAdd? |
Thread Tools | |
Display Modes | |
|
|