Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cancel button

Status
Not open for further replies.

quibus

Technical User
Jul 18, 2002
8
BE
hey,
I'd like to use a cancel button on a form. The problem is that there are several field on the form. When I fill in some of the field and then press cancel, the data that was filled in is saved. I don't want it to be saved...what is the solution for this??
I allready set Cancel Property to Yes ; and made a procedure with:
DoCmd.Close acForm, Me.Name
 
You are doing too much. Build your cancel button. Then in the on click event of your button, put the following line of code.

me.undo

This will cancel everything the user has done.

Then, if you really want to close your form, simply add this further line of code

docmd.close acform,me.name Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top