cursor placement on data exception

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top