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 Programming / May 2008

Tip: Looking for answers? Try searching our database.

Close form and NOT save data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Eliot - 30 May 2008 03:03 GMT
I have a form called "Notes" which has a date/time stamp field and a
memo field. If the person writes a note and then decides not to save it,
I want a button that says "Cancel" that will close the form and NOT save
the data. (I have an "OK" button that closes the form and saves the data
that works just fine.)
** Posted from http://www.teranews.com **
Jeanette Cunningham - 30 May 2008 05:11 GMT
Dave,
use this code:

If Me.Dirty = True Then
   Me.Undo
End If
DoCmd.Close acForm, Me.Name

for the cancel button

Jeanette Cunningham -- Melbourne Victoria Australia

>I have a form called "Notes" which has a date/time stamp field and a memo
>field. If the person writes a note and then decides not to save it, I want
>a button that says "Cancel" that will close the form and NOT save the data.
>(I have an "OK" button that closes the form and saves the data that works
>just fine.)
> ** Posted from http://www.teranews.com **
Dave Eliot - 30 May 2008 13:44 GMT
> Dave,
> use this code:
[quoted text clipped - 14 lines]
>> just fine.)
>> ** Posted from http://www.teranews.com **

Thanks so much. Really appreciate you help.
** Posted from http://www.teranews.com **
 
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.