Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / February 2007

Tip: Looking for answers? Try searching our database.

Undo / detect changes in a subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kcsims - 23 Feb 2007 14:14 GMT
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.
Michel Walsh - 26 Feb 2007 15:59 GMT
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

>I want to be able to detect changes in a subform and undo or save them.  I
>am
[quoted text clipped - 15 lines]
> able to enable the cmdCancel button on the mainform.  Any help would be
> great.  Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.