Re: Undo / detect changes in a subform



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
news:456A8CAE-37EB-420D-8DAC-2311B59C0BA7@xxxxxxxxxxxxxxxx
I want to be able to detect changes in a subform and undo or save them. I
am
using "How to Undo or Rollback Main Form and Subform Changes" from
FrmSmp97
using modUndoMain&Subform with the following code on cmdCancel:

Private Sub Form_Current()
SaveSub Me![chdASSET_MANAGER_RESULTS].Form, "INTERVAL TEMP"
End Sub
Private Sub cmdCANCEL_Click()
UndoSub Me![chdASSET_MANAGER_RESULTS].Form, "INTERVAL TEMP"
End Sub

This works fine using a backup table called "INTERVAL TEMP" to undo
changes
to the subform. I want to be able to detect changes made to that table to
be
able to enable the cmdCancel button on the mainform. Any help would be
great. Thanks.


.



Relevant Pages

  • Re: Transaction Rollback/Commit ?
    ... You cannot open a main form within a custom transaction, ... subform loading records inside the same transaction so you can roll the ... allow multiple users to edit simultaneously and then selectively undo a ... > db=currentdb- that's how the application opens the db everywhere in the ...
    (microsoft.public.access.formscoding)
  • Re: Undo segments and disk usage
    ... over 12 gig and filled up a hard drives at some sites. ... oracle keeps 10 segments in the undo area and selects ... expired segments almost randomly for transactions. ... long running weekly transaction. ...
    (comp.databases.oracle.server)
  • Re: Commits and Rollbacks
    ... doing this reset which sets the transaction of the subform in the main form. ... So how do I set up another transaction for the main form in the same place? ... Private Sub Form_Unload ... ' Create and assign filtered recordset for subform. ...
    (microsoft.public.access.formscoding)
  • Problem with SQLCeDataReader and transaction
    ... I have problem starting transaction with sql server ce 2.0 after I ... Private Sub Button1_Click(ByVal sender As System.Object, ... Dim sqlCmd As SqlCeCommand ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Ambiguous Error for NotInList code
    ... >> Yes, you're right, and I'd rather not not to use the second form, and ... >> continue the entry and save it. ... > transaction entered is not an error. ... > Private Sub cmbTransaction_BeforeUpdate ...
    (microsoft.public.access.forms)