How to Undo Form and Subform Changes in Microsoft Access
Question details
The user needs a reliable method to undo or cancel edits made in Microsoft Access forms and subforms, especially to prevent parent records from saving automatically.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user is entering or editing data in a database using bound forms that contain subforms.
- Observed behavior
- When the user clicks or navigates into a subform, Access automatically saves the parent form's record, making standard cancellation or undo commands ineffective for the main record.
Verify whether your main form and subform are currently bound directly to a table (via the Record Source property), as this underlying architecture determines how Access triggers automatic saving events.
Use Me.Undo for the Current Form Record
The simplest built-in command to revert changes in the active form before the record is saved or focus shifts to a subform.
Access automatically saves the main record when your cursor moves to a subform. The Me.Undo command works perfectly for discarding uncommitted edits in the active form, but it cannot roll back parent records once the focus has transitioned.
Open your main form or subform in Design View and add a Command Button from the Form Design controls.
Open the Property Sheet for the button, go to the Event tab, click 'On Click', select Code Builder, and type 'Me.Undo' into the VBA window.
Switch to Form View, make an edit in a field without moving to the subform, and click the button to verify the changes are reverted.

Implement Unbound Forms for Complete Control
Disconnect your form from the underlying table to ensure data is only saved when explicitly requested by the user.
Utilize Temporary Tables
Hold copies of the live data in temporary tables while users edit records, committing them to live tables only upon explicit saving.
Looking for a Free, Lightweight Office Suite?
While Microsoft Access handles complex database management, WPS Office provides a lightweight, highly compatible alternative for your everyday document, spreadsheet, and presentation needs. Enjoy seamless file compatibility and a familiar interface without subscription fees.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Suite: Follow the simple on-screen prompts to install WPS Writer, Spreadsheet, Presentation, and PDF on your device.
- 3. Open Your Files: Launch WPS Office and directly open your existing Microsoft Office files to continue working seamlessly.

Frequently Asked Questions
Why does my main form save automatically when clicking into a subform?
In Microsoft Access, a subform is treated as a separate object. When focus leaves the main form to enter the subform, Access assumes you have finished editing the main parent record and automatically commits (saves) it to the database to maintain referential integrity.
Can I hide subform controls to prevent premature saving in Access?
Yes. You can set the 'Visible' property of the subform control to False during initial data entry. Once the user clicks a specific 'Save Main Record' button, you can use VBA to make the subform visible for detail entry, preventing the automatic save sequence from triggering too early.
Does pressing the ESC key undo subform edits?
Pressing ESC once undoes changes in the currently active field, and pressing it twice undoes changes for the active record. However, if focus has already shifted between the main form and subform, the ESC key will only affect the current subform record and will not roll back the previously saved parent record.




