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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Cancelling update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 13 Jan 2008 20:20 GMT
Hi

I am setting Cancel = true in BeforeUpdate event of a form but the edits by
user still stay there. How can I undo user edits on the form?

Many Thanks

Regards
Dirk Goldgar - 13 Jan 2008 20:29 GMT
> Hi
>
> I am setting Cancel = true in BeforeUpdate event of a form but the edits
> by user still stay there. How can I undo user edits on the form?

In addition to setting Cancel = True, undo the form:

   Cancel = True
   Me.Undo

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Arvin Meyer [MVP] - 13 Jan 2008 20:29 GMT
Just before the Cancel = True line in your code, add the line:

Me.Undo

That will undo the record, and cancel the save, but you will still use an
autonumber, if that concerns you.
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

> Hi
>
[quoted text clipped - 4 lines]
>
> Regards
 
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



©2009 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.