PC Review


Reply
Thread Tools Rate Thread

Cancelling update

 
 
John
Guest
Posts: n/a
 
      13th Jan 2008
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


 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      13th Jan 2008
"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      13th Jan 2008
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.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancelling update John Microsoft Access Forms 2 13th Jan 2008 08:29 PM
Cancelling update John Microsoft Access Form Coding 2 13th Jan 2008 08:29 PM
Cancelling an Update Ron Windows XP Performance 4 21st Sep 2004 07:19 PM
Recovering from cancelling an SP2 Update kitfox Windows XP General 2 25th Aug 2004 01:22 PM
Cancelling Add or Update of Records Jody Microsoft Access Forms 2 2nd Feb 2004 09:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:50 AM.