If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
cancel button for form
How do you program a cancel button so that the form does not file the
information in the table? |
#2
|
|||
|
|||
Set the button's cancel property to True and then place the following code in
the button's _Click procedu Private Sub cmdCancel_Click() If Me.Dirty Then Me.Undo End If DoCmd.Close acForm, Me.Name End Sub "robin" wrote: How do you program a cancel button so that the form does not file the information in the table? |
#3
|
|||
|
|||
First, you have a Cancel button preprogrammed for you. The Esc key does this
job. Educate the user that pressing Esc once undoes the current control and pressing Esc a second time undoes the current record. That said, the code you need behind a button is Me.Undo -- Wayne Morgan MS Access MVP "robin" wrote in message ... How do you program a cancel button so that the form does not file the information in the table? |
#4
|
|||
|
|||
thanks, jason & wayne
"Wayne Morgan" wrote: First, you have a Cancel button preprogrammed for you. The Esc key does this job. Educate the user that pressing Esc once undoes the current control and pressing Esc a second time undoes the current record. That said, the code you need behind a button is Me.Undo -- Wayne Morgan MS Access MVP "robin" wrote in message ... How do you program a cancel button so that the form does not file the information in the table? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get a Toggle Button to work | colin | General Discussion | 2 | March 5th, 2005 12:51 AM |
Give a botton on an Option Group Post Defualt | Jan Il | Using Forms | 14 | November 28th, 2004 05:21 AM |
Open form, Edit button, etc | Aniko | Using Forms | 14 | July 25th, 2004 08:17 AM |
Form Doesn't Go To New Record | Steve | New Users | 15 | May 16th, 2004 04:33 PM |