Help with text box! (1 Viewer)

Y

yanitha

Guest
I wrote the following code for a textbox on a form.
If Me![MatchDate] > Me![FLIGHT_END_DATE] Then
MsgBox "Enter a date within the Flight Date range.", , Title
End If

After the message box is displayed, I need to set the focus back to the textbox. Any suggestions!
Thanks
 

KDg

Registered User.
Local time
Today, 07:53
Joined
Oct 28, 1999
Messages
181
If the code is in the On_Exit event of the box you can use Cancel=True to stop the focus leaving the box, that makes it a bit tricky to leave at all though - have you tried Me.Flight_End_Date.setfocus?
 

Users who are viewing this thread

Top Bottom