G
Guest
Hi,
I'm attempting to override the following error message upon pressing a 'Save Record' command button on a form (to insert a record). The form contains an underlying required field and this error occurs when that field is missing a data value:
"The field <venue> cannot contain a null value because the required property for thiis field is set to true. Enter a value in this field."
I'm using the following code in the On Error event of the Form:
If DataErr = 3314 Then
MsgBox "You must supply a venue."
Response = acDataErrContinue
End If
Upon researching past messages, I believe I am using the correct error code. It is interesting that this code does override the natural error message when I click the forward navigation button and produces my custom error message as desired. However, it does not do this when the 'Save Record' command button (residing on the form) is pressed.
Can anyone suggest how to immediately invoke my custom error message when the 'Save Record' button is pressed after the circumstances described above?
Thanks,
Jody
I'm attempting to override the following error message upon pressing a 'Save Record' command button on a form (to insert a record). The form contains an underlying required field and this error occurs when that field is missing a data value:
"The field <venue> cannot contain a null value because the required property for thiis field is set to true. Enter a value in this field."
I'm using the following code in the On Error event of the Form:
If DataErr = 3314 Then
MsgBox "You must supply a venue."
Response = acDataErrContinue
End If
Upon researching past messages, I believe I am using the correct error code. It is interesting that this code does override the natural error message when I click the forward navigation button and produces my custom error message as desired. However, it does not do this when the 'Save Record' command button (residing on the form) is pressed.
Can anyone suggest how to immediately invoke my custom error message when the 'Save Record' button is pressed after the circumstances described above?
Thanks,
Jody