Date error

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi I have a date input mask and I get an error message
saying that the format is wrong if for example one number
is left out of the year etc..

please could you tell me how to trap this error to
display my own error message, I must have it as a
vbinformation msgbox instead.

Thanks

Peter
 
Hi,
You can trap this error in the Form's error event. The number is 2279.
Something like this:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2279 Then
MsgBox "put something here"
Response = acDataErrContinue
End If
End Sub
 
Back
Top