Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need code or suggestions for UNDOING all changes to a record

Status
Not open for further replies.

TeddB

MIS
Jul 16, 2001
38
US
Situation: A record is opened in a form for editing. Information in several fields is edited. Now, user decides not to keep changes and leave record in its original state. Since Access records changes to information when you leave the field, how can changes to all fields be undone? "A good man knows his limitations." -- "Dirty Harry" Callahan (Clint Eastwood)
 
I should have searched forum first. Solution previously given.

hsitz (Programmer) Jan 21, 2002
I usually use a VBA procedure to run from the "Don't Save" or "Cancel changes" button. You can put this in the VBA slot for that command button:
----------------------
'dirty property is true only if there have been changes
'so only need to undo if there have been changes

if me.dirty then
me.undo
end if

docmd.close
----------------------
"A good man knows his limitations." -- "Dirty Harry" Callahan (Clint Eastwood)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top