Cancel form entry


V

Very Basic User

I hope this is an easy one. I have a simple form used for data entry. Because
users are not familiar with access, I added a save and close button that
really only closes the form. In the form I have a few required fields, so if
these are not filled out, the user gets several error messages.

What I want to add is a cancel button that simply closes the form without
saving any information that has been already entered and gives no error
messages. This way if a user starts to enter information and either makes a
mistake or decides to not make the entry, they can push "Cancel" and the form
will close without creating a new entry in the table.
 
Ad

Advertisements

B

BruceM

In the button's Click event:

Me.Undo
DoCmd.Close acForm, Me.Name

This will clear, then close the form on which the button resides.
 
V

Very Basic User

Perfect! thank you
--
Thank you for your time!
John


BruceM said:
In the button's Click event:

Me.Undo
DoCmd.Close acForm, Me.Name

This will clear, then close the form on which the button resides.
 
Ad

Advertisements


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