Hi,
I have a Form1 containing a Subform. The Subform is based on a table and when a required field in this table is not entered the default "field is blank" error occurs. I am trying to error capture this default error and display a more helpful message. But what happens is the default message dialog box still comes up, followed by my custom message dialog box afterwards?? My code is:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Const conErrCode = 2169
If DataErr = conErrCode Then
MsgBox ("Which Patient? Please enter the Patient UR.")
Response = acDataErrContinue
Else
Response = acDataErrDisplay
End If
End Sub
This code is in the On Error section of Form1. If I put this code in the On Error section of the Subform then my custom error message does not appear at all.
So how do I get only my custom error message to appear?
Thanks for any help.
Jason.
Melbourne,
Australia
I have a Form1 containing a Subform. The Subform is based on a table and when a required field in this table is not entered the default "field is blank" error occurs. I am trying to error capture this default error and display a more helpful message. But what happens is the default message dialog box still comes up, followed by my custom message dialog box afterwards?? My code is:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Const conErrCode = 2169
If DataErr = conErrCode Then
MsgBox ("Which Patient? Please enter the Patient UR.")
Response = acDataErrContinue
Else
Response = acDataErrDisplay
End If
End Sub
This code is in the On Error section of Form1. If I put this code in the On Error section of the Subform then my custom error message does not appear at all.
So how do I get only my custom error message to appear?
Thanks for any help.
Jason.
Melbourne,
Australia