problem with Exit command button

J

Jennifer

I have a form with a field for IDNumber that is a required
field. This form also has an Exit command button that
closes the form when clicked. If I close the form using
the Close button on the upper right hand corner of the
window, and no number is entered in the IDNumber field, I
get an error message reading, "The field IDNumber cannot
contain a Null value because the Required property for
this field is set to True. Enter a value in the field."
After I click okay, another message appears saying, "You
can't save this record at this time." However, when I
close the form using the Exit command button, so such
messages appear. Upon clicking the Exit button when the
IDNumber field is blank, the form will simply close
without saving the data (unbeknownst to the user). How
can I get the same error messages to appear when clicking
on the Exit command button? (The button was added using
the Command Button Wizard: Form Operations: Close Form.)

Thank you for any help you might be able to provide!

Jennifer
 

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

Top