OK folks, probably simple answer to this but I'm just missing something. I have a text box that needs validated before moving on to the next control. I can NOT disable the ENTER keys property that allows it to advance to the next field, it's used elsewhere on the form. If the input is invalid and the user hits enter how do I prevent the form from displaying the warning message and advancing to the next control anyway on ENTER? I've tried a dozen variations and EVENT locations with no success. Any great ideas? (using Access 2007 db)
Here's what I'm working with:
Private Sub TrnAppointmentTime_AfterUpdate()
If (TrnAppointmentTime.Value >= "0000" And TrnAppointmentTime.Value <="2359" Then
Call SOMETHING_ELSE
Else
MsgBox "ENTER CORRECT TIME AND OTHER STUFF", vbCritical
Me.TrnAppointmentTime.SetFocus
End If
End Sub