P
pvp
I have a simple form through which I enter data into a
d/b file. I have set the on_error for the form and this
contains the following:
"
Private Sub Form_Error(DataErr As Integer, Response As
Integer)
MsgBox "hello!"
Response = acDataErrContinue
End Sub
"
This is to check when I get into it and suppress any
system error messages.
I then enter data into the form that I know will cause
the update to the underlying file to fail. When I click
a 'save record' button created by the buttonb wizard on
the form, which uses:
"
DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70
"
....I get the system error message and the form_error code
above is not entered at all. I thought it would have done?
When I use the Tab key to save the data instead, I get
into my form_error code.
Also when I make a mistake such as entering duff data in
an individual field, this is detected as I go into the
next form field then the form_error code is entered, as
expected.
What is wrong with my save record button that it does not
get into the form_error code?
Thanks.
d/b file. I have set the on_error for the form and this
contains the following:
"
Private Sub Form_Error(DataErr As Integer, Response As
Integer)
MsgBox "hello!"
Response = acDataErrContinue
End Sub
"
This is to check when I get into it and suppress any
system error messages.
I then enter data into the form that I know will cause
the update to the underlying file to fail. When I click
a 'save record' button created by the buttonb wizard on
the form, which uses:
"
DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70
"
....I get the system error message and the form_error code
above is not entered at all. I thought it would have done?
When I use the Tab key to save the data instead, I get
into my form_error code.
Also when I make a mistake such as entering duff data in
an individual field, this is detected as I go into the
next form field then the form_error code is entered, as
expected.
What is wrong with my save record button that it does not
get into the form_error code?
Thanks.