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

me.undo

Status
Not open for further replies.

acess2001

Programmer
Aug 6, 2001
3
GB
Hi

I have a cancel button on my form which uses the .undo functin to undo any changes. This works great on a single form but if I use it on a form with a subform, it will only undo changes to the main form and not the subform.

Does anyone have any idea how I can undo the sub form as well???
 
When you left the subform and enter to your main form the records of subform will be updated.

If you want to make a cancel proc. to subforms on your main form you must save subforms' orig values.

Perhaps specify the "On Enter" event proc of subform; and save the subform's recordset in a permanent recordset (for example "rst") or in an array
- if the rst.id <>subform.recordset.id (<- f.e. the &quot;Link Child Field&quot;). At the cancel proc restore the saved recordset of the subform.

ide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top