Re: Undo / detect changes in a subform
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Mon, 26 Feb 2007 10:59:24 -0500
The ADH handbook has details about it, and probably your reference too, I
imagine. What seems missing, from 50000 miles of altitude, is that you do
not seem to use transaction. Indeed, rolling back a transaction will undo
the batch of modifications brought to the database since the start of the
transaction. The problem is that the Access Forms start their own internal
transaction, and you have to cooperate with them. The list of details is
well described in ADH 97 (Access 97 Developers' Handbook), or later, but I
cannot put my hand on that book at the moment... I just hope you can.
Vanderghast, Access MVP
"kcsims" <kcsims@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
I want to be able to detect changes in a subform and undo or save them. I
using "How to Undo or Rollback Main Form and Subform Changes" from
using modUndoMain&Subform with the following code on cmdCancel:
Private Sub Form_Current()
SaveSub Me![chdASSET_MANAGER_RESULTS].Form, "INTERVAL TEMP"
Private Sub cmdCANCEL_Click()
UndoSub Me![chdASSET_MANAGER_RESULTS].Form, "INTERVAL TEMP"
This works fine using a backup table called "INTERVAL TEMP" to undo
to the subform. I want to be able to detect changes made to that table to
able to enable the cmdCancel button on the mainform. Any help would be