Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2008

Tip: Looking for answers? Try searching our database.

cancel update of record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chegu Tom - 30 Jan 2008 19:50 GMT
I want to put a button on my form with code that will tell access to close
the form and not  update the current record.

Assuming the user has entered information on the form and then reailzes he
doewnt want that info in the database

Thanks
John W. Vinson - 30 Jan 2008 21:38 GMT
>I want to put a button on my form with code that will tell access to close
>the form and not  update the current record.
[quoted text clipped - 3 lines]
>
>Thanks

Use the Code Builder to put into the [Event Procedure] of the command button's
click event:

Private Sub cmdQuit_Click()
Me.Undo ' erase all changes to the current record
DoCmd.Close acDataForm, Me.Name ' close the form
End Sub

            John W. Vinson [MVP]
Chegu Tom - 01 Feb 2008 20:44 GMT
me.Undo

me.DUH or me.DOH (Homer Simpson style)

Thanks.  For some reason I could not remember that.

Tom

>>I want to put a button on my form with code that will tell access to close
>>the form and not  update the current record.
[quoted text clipped - 14 lines]
>
>             John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.