To handle the use of the X in the right top corner of a form i am using the before_update event of the form and set the Cancel = true. This brings up a message
"You can't save this record at this time.
<my app name> may have encountered an error while trying to save a record. If you close this object now , the data changes you made will be lost. Do you wan to close the database object anyway?
No error code number is indicated.
YES and NO buttons
Yes will reset the information on the screen and no will put me back to the form.
NO will bring me back to the form
I want to avoid the above message and have the user just returned to the form, which is the NO option
I was able to catch the error with a custom message in the following way
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2169 Then
MsgBox ("test"
Response = acDataErrContinue
End If
End Sub
But using Response = acDataErrContinue will trigger YES
If I do not use Response = acDataErrContinue then I get the message with the YES and NO buttons.
I have spent no several hours on trying to figure this out without any result
What am I doing wrong
Any help is appreciated
"You can't save this record at this time.
<my app name> may have encountered an error while trying to save a record. If you close this object now , the data changes you made will be lost. Do you wan to close the database object anyway?
No error code number is indicated.
YES and NO buttons
Yes will reset the information on the screen and no will put me back to the form.
NO will bring me back to the form
I want to avoid the above message and have the user just returned to the form, which is the NO option
I was able to catch the error with a custom message in the following way
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2169 Then
MsgBox ("test"
Response = acDataErrContinue
End If
End Sub
But using Response = acDataErrContinue will trigger YES
If I do not use Response = acDataErrContinue then I get the message with the YES and NO buttons.
I have spent no several hours on trying to figure this out without any result
What am I doing wrong
Any help is appreciated