You can prevent the native error message by trapping it, like this:
Code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2113 Then 'Data entered does not match datatype of Control Source
Response = MsgBox("This Field Must Be Entered as a Valid Date!", vbExclamation, "Not a Valid Date!")
Response = acDataErrContinue
End If
End Sub
This simply prevents the native error message and pops up one of your own. Don't really get the validation you're trying to do, but you should be able to work from here and do what you need...using Me.ActiveControl to refer to the Control that caused the error.
But the simplest way to do this would be to only let the users enter dates using the native DatePicker...doesn't get much easier than that!
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007