View Full Version : Cancel button?


RpbertS
03-31-2000, 10:32 AM
Hi,
i have a quick question,
I have a form that holds information and say a user inputs some and then decides its not the right form or whatever is there a way to exit the form with out saving the changes to the table?

thanks for the time,
Rbp

R. Hicks
03-31-2000, 04:41 PM
Make a Cancel button and add the following code to the On Click event of the button:

Private Sub cmdCancel_Click()
Me.Undo
DoCmd.OpenForm "YourNextForm"
DoCmd.Close acForm, Me.Name
End Sub

Change "YourNextForm" to whatever the form is you wish to open next.

HTH
RDH

[This message has been edited by R. Hicks (edited 03-31-2000).]

[This message has been edited by R. Hicks (edited 03-31-2000).]

RpbertS
04-04-2000, 06:45 AM
thanks for the help, works great

Rpb