Unanswered: How can I suppress error message #3314
How can I disable error message #3314
"The field numshipments cannot contain a Null value because the required property for this field is set to True. Enter a value in this
I have custom error message for #3314 but this message still pops up.
It'll display "The number of Shipments field is missing." Then Access
display the error message above. I placed .SetWarnings property before If statement but it does work. How can I suppress the error
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
If IsNull(txtnumShipments) Then
MsgBox "The Number of Shipments field is missing."
Ahhhh! You've got this in the Click event of a button, haven't you? My bad. Sorry.
This isn't going to work then. The error is thrown as soon as the focus moves off the control txtNumShipments. You need to put the error handling in the AfterUpdate event of txtNumShipments. Either that, or set the Required property to False for the field, and just check if txtNumShipments is null in your Click event as you have been (and Exit Sub if it is).