J
Justin83716
I received an error message that essentially asks you if you want to exit
without saving, YES or Cancel are your options. I customized this message in
vb, but now when my error pops up your only option is to say yes. How can I
keep the Cancel button that was on the original error. Below is my code.
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 3314 Then
Response = acDataErrContinue 'Don't display the default message
MsgBox "Enter data in all required fields."
ElseIf DataErr = 2169 Then
Response = acDataErrContinue 'Don't display the default message
MsgBox "Close form without saving?"
Else
MsgBox "Error#: " & DataErr 'Display the error number
Response = acDataErrDisplay 'Display default message
End If
End Sub
Thanks for any help!
without saving, YES or Cancel are your options. I customized this message in
vb, but now when my error pops up your only option is to say yes. How can I
keep the Cancel button that was on the original error. Below is my code.
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 3314 Then
Response = acDataErrContinue 'Don't display the default message
MsgBox "Enter data in all required fields."
ElseIf DataErr = 2169 Then
Response = acDataErrContinue 'Don't display the default message
MsgBox "Close form without saving?"
Else
MsgBox "Error#: " & DataErr 'Display the error number
Response = acDataErrDisplay 'Display default message
End If
End Sub
Thanks for any help!