Microsoft Access maintains editing changes that you make to a single record in a form in a transaction independent of changes that you make to other records in the same form or in other forms, including subforms. When you choose to undo a record, Microsoft Access rolls back the transaction only for that singular record in the form.
This behavior extends to subforms. Microsoft Access maintains editing
changes for a subform record in one transaction independent of record
edits you make to other subform records in the same form or in another
form, including the main form.
Because of the way that Microsoft Access maintains editing changes, it is
not possible to group editing changes that you make to a main form and subform records in a single transaction. You cannot use the
BeginTrans,
CommitTrans, and
Rollback statements or methods for this purpose. Microsoft Access controls all transaction processing for a form in a separate workspace independent of the workspace that these actions and methods could be invoked in, and Microsoft Access does not expose this separate workspace.
Steps to Reproduce Behavior
- Open the sample database Northwind.mdb.
- Open the Categories form in Form view.
- In the CategoryName field, change the category from Beverages to Super Beverages.
- Under Product Name in the subform, change the first record's name
from Chai to Tasty Chai.
- Click the CategoryName field on the main form, and on the Edit
menu, click Undo Saved Record. Note that in the main form Super Beverages returns to Beverages, but that in the subform Tasty Chai remains Tasty Chai.
- Click the first record in the subform, and on the Edit menu, click Undo Saved Record. Note that Tasty Chai returns to Chai.