close form without required field msg box

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

Guest

How can I close a form with required fields without the msg box popping up
to enter required fields.
I do not want the user to have to hit the escape button. I want the form to
close without msgs.
 
Deb

How will Access "know" when it is OK to NOT require fields, or when it MUST
require fields? Maybe you don't need required fields?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
If the user closes the form without filling in the required fields, the
record will be deleted. This is working. however it displays the required
field msg box before deleting the record and closing the form.
 
It sounds like your user could close the form one time and get his/her work
deleted and close it another time and get it saved. How do they know what's
happening?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Deb, in the property sheet change the required=yes to required=no for all
fields in question.
In the form_close event, have your code check each textbox that was formerly
'required'. If any are null, delete the record.
If all are OK, save the record.

HTH, UpRider
 

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

Back
Top