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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undoing changes on a bound, modal pop-up form

Status
Not open for further replies.

gaffonso

Programmer
Jul 26, 2001
25
0
0
US
I've got a modal pop-up form that bound to a table. The cancel button should close the form and ignore any changes.

Problem is, changes made to fields on the pop-up form are committed after the user unfocuses on the field being edited. If a user makes a bunch of changes to various fields in the form, the fields are committed are already committed before cancel button ever has a chance to do its thing.

Any suggestions on how to get around this?

Thanks!

- Gary
 
Create a copy of a table which is a data source for your form. Then when you open the form, copy the current record to that table. And if you press Cancel button, copy the record from the new table back into the edited record.
 
What do you mean by "committed"? Are you saving the changes every time the user moves the focus from one field to another? If not, then you can undo the entire record using:
Me.Undo
or
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top