cursor placement on data exception

J

jube

The problem is, I get a data isNULL when I leave a date/time field blank
.....but Access does not let me know until I get to the bottom of that form?
And then the cursor stays at the last field is in, which is the bottom of the
form. How do I get it to tell me as soon as I leave that entry box?
 
W

Wayne Morgan

You could use the Exit event of the box to advise the user that the field
was left empty and cancel the movement of the cursor.

Example:
If Not IsDate(Me.txtMyTextbox) Then
Msgbox "You must make a valid entry into this field before continuing!",
vbOkOnly + vbExclamation
Cancel = True
End If
 
Top