How to Fix Microsoft Access Form Not Saving Changes After On Change Event
Question details
The user needs to resolve an issue where a Microsoft Access form fails to save modifications and remains in an unsaved state after an On Change event executes.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user edits a date field in a form bound to a complex query, which triggers an On Change macro or VBA procedure intended to update another table.
- Observed behavior
- The form record remains in an unsaved, dirty state (indicated by a pencil icon in the record selector) after the event procedure finishes.
Ensure you identify exactly which tables your form query is bound to and open the form in Design View to safely review your macros and VBA code.
Save the Form Record Before the Macro Executes
Force the Access form to commit its current data before handing control over to the On Change procedure to prevent saving conflicts.
When a procedure updates related tables while the current form record is still being edited, Access may lock the record or leave it in a dirty state. Explicitly saving the record first prevents this conflict.
Right-click your form in the navigation pane and select Design View.
Select the date field that triggers the code, open the Property Sheet (F4), and go to the Event tab to find the On Change property.
If using VBA, add 'DoCmd.RunCommand acCmdSaveRecord' at the very beginning of the procedure. If using Macros, insert a 'SaveRecord' action as the first step before it updates the other table.
Switch back to Form View, change the date field, and verify that the pencil icon disappears and the record commits successfully.

Verify Table Bindings and Required Fields
Ensure that the form and the triggered recordset are not attempting to update the same tables incorrectly or missing mandatory data.
Looking for a Lightweight and Compatible Office Suite? Try WPS Office
While Microsoft Access handles complex relational databases, WPS Office provides a free, highly compatible alternative for all your document, spreadsheet, and presentation needs. It's lightweight, easy to use, and perfect for seamless productivity.
- 1. Download the installer: Visit the official WPS Office website and click the free download button.
- 2. Install the suite: Run the setup file and follow the simple on-screen instructions to install WPS Office on your computer.
- 3. Manage your data: Launch WPS Spreadsheet to easily open, analyze, and manage your exported database files and Excel documents.

Frequently Asked Questions
What does the pencil icon mean in a Microsoft Access form?
The pencil icon located in the record selector on the left side of an Access form indicates that the current record has been modified (is 'dirty') but has not yet been saved to the database.
Why does an On Change event prevent my form from saving?
If the On Change event triggers code that updates related tables or shifts focus without explicitly saving the main form first, Access may leave the current form record in an unsaved state to prevent data locking conflicts or partial updates.
Can a form bound to a complex query update records?
It depends on the query. If the query contains complex joins, calculated fields, or aggregate functions, the resulting recordset might become read-only, preventing the form from saving any changes to the underlying tables.




