How to Undo Changes Across Microsoft Access Subforms
Question details
The user needs a single reset or undo action that applies to a main Microsoft Access form and its multiple subforms simultaneously.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Creating a multi-form data entry interface where non-technical users can safely cancel all form and subform changes at once via a single button.
- Observed behavior
- Looking for a reliable way to implement a global undo without keeping a database transaction open for the entire form session, which causes locking issues.
Before implementing a global undo function, ensure your database architecture is finalized, as changing table structures later will require updating your temporary backup tables or VBA code.
Use Temporary Tables or Mirror Values to Store Initial Data
The safest and most reliable way to handle global undos across subforms without locking the database in a multi-user environment.
Keeping a database transaction open for the duration of a form session is heavily discouraged. Long-running transactions place severe locks on records and tables, making them highly unsuitable for multi-user applications.
Instead, saving initial values into a temporary mirror structure when the form opens allows you to easily restore them if the user chooses to cancel their edits.
Design a local, temporary table in your front-end database that exactly mirrors the structure of your main form and subform data sources.
Write a VBA procedure attached to the main form's 'On Load' event. This script should copy the current record's initial data into your temporary table.
Add a single 'Reset' or 'Undo' button to your main form's interface to serve as the global cancel action.
Attach a VBA script to the button's 'On Click' event. This script must delete the modified records, copy the original data from the temporary table back into the live tables, and refresh the form using 'Me.Requery'.

Use VBA to Scan and Revert Unbound Control Values
A code-based alternative that iterates through form controls to restore original values, suitable for unbound form designs.
Manage Your Data Easily with WPS Office
While Microsoft Access is a specialized database tool, many complex data management, entry, and reporting tasks can be handled more seamlessly using advanced spreadsheets. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office, featuring robust spreadsheet capabilities for tracking and analyzing data without the hassle of VBA programming.
- 1. Visit the WPS Office website: Go to the official WPS Office website from your preferred web browser.
- 2. Download the installer: Click on the 'Free Download' button to get the latest version of WPS Office.
- 3. Install and launch: Run the installer, follow the on-screen prompts, and start managing your data efficiently.

Frequently Asked Questions
Why shouldn't I use long-running database transactions in Microsoft Access?
Keeping a transaction open while a user fills out a form places severe locks on tables and records. In a multi-user environment, this prevents other users from accessing or modifying the data, leading to application freezes, timeouts, and conflicts.
Can I use the built-in Access Undo command for multiple subforms at once?
No. The built-in 'Me.Undo' command generally only works for the current form or the specific record being actively edited. It cannot natively roll back changes across a main form and multiple subforms simultaneously if focus has shifted or records have been auto-saved.
Is it better to use bound or unbound forms for a multi-form data entry interface?
Unbound forms offer more granular control over when data is saved to the underlying tables, making global 'Undo' operations easier to implement. However, they require significantly more VBA coding compared to bound forms, which handle saving automatically.




