Help with text box!

  • Thread starter Thread starter yanitha
  • Start date Start date
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
 
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

Back
Top Bottom