required entry

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

Guest

kinda of stupid question but my brain is on vacation. wondering how to make
it so on a non bounded textbox, a user is required to enter a value and is
not allowed to leave the textbox without doing so?
 
Try putting this code in the On Unload property of the form:

If IsNull(Me!MyTextbox) Then
MsgBox "Must enter a value in the text box."
Cancel = True
Me!MyTextbox.SetFocus
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top