EvilTwinOfAtrus
Technical User
Hi.
I have a form with a date on. The date box is 'Text196'.
What I want to do is make it so that when this text box gains focus, the user MUST enter a date. If the user doesn't then a dialogue box is displayed and the focus stays set on the 'Text196' text box. This is what I have at the moment on the 'LostFocus' event:
If Text196 = Null Then
MsgBox "Cannot leave Date Blank", vbCritical, "Please enter date!"
Text196.SetFocus
End If
This does absolutely nothing. Any ideas?
Thanks,
Karl
I have a form with a date on. The date box is 'Text196'.
What I want to do is make it so that when this text box gains focus, the user MUST enter a date. If the user doesn't then a dialogue box is displayed and the focus stays set on the 'Text196' text box. This is what I have at the moment on the 'LostFocus' event:
If Text196 = Null Then
MsgBox "Cannot leave Date Blank", vbCritical, "Please enter date!"
Text196.SetFocus
End If
This does absolutely nothing. Any ideas?
Thanks,
Karl