Clear Form button to work despite validation conflicts

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

Guest

I have a form with almost all fields required via Exit Event validation so
the fields are not left blank. I also have a clear form button. Is it
possible to make the button work bypassing the Exit Event validation errors?
The situation may arise where our user is entering data they are receiving
during a phone call but for various reasons they will no longer need to
complete or keep the record (ie, the call is terminated, caller has
incomplete info, etc.). As is they will have to close the form completely
with the dreaded 'X'. There's got to be a better way.

Thanks in advance!
Kristine
 
Code the "Clear Form" button with statement like:

Me.Undo

which will undo all data entries on the current Record that have not been
updated into the Table.

If you swant to close the Form also, use additional statement like:

DoCmd.Close acForm, Me.Name, acSaveNo

Check Access VB Help on the Undo method and the Close method.
 
Thanks. This is similar to what I had already but I tried it and it does the
same thing and does not bypass the validation errors.
 
Please describe how you set and check the validation ...

Me.Undo simply clear all data entries so Table validation shouldn't even be
activated and neither the Form's Update. You, perhaps, use the Control
validation???
 

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