Cancel Button

C

Chris B

I have created a form to add a record to a table. This is
someone elses DB so I can not change the Table Structure.
Once I enter the form, a record is created. I have a
close button on the form, but also want to have a Cancel
Button in case the user decides not to add this record. I
have tried a few things, but can't seem to find the
correct code to avoid saving this record. It needs to act
like an ESC then close the form without saving the record.
This is the last item on a project I'm working on.
Any help would be appreciated.
 
C

Chris B.

Thank you....I was trying to make it more difficult than
it needed to be!!
-----Original Message-----
Use the Undo method of the form:

Me.Undo



--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Chris said:
I have created a form to add a record to a table. This is
someone elses DB so I can not change the Table Structure.
Once I enter the form, a record is created. I have a
close button on the form, but also want to have a Cancel
Button in case the user decides not to add this record. I
have tried a few things, but can't seem to find the
correct code to avoid saving this record. It needs to act
like an ESC then close the form without saving the record.
This is the last item on a project I'm working on.
Any help would be appreciated.
.
 

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