Cancel Button

  • Thread starter Thread starter Chris B
  • Start date Start date
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.
 
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.
.
 
Back
Top