Fix Access Cannot Find a Record When Leaving a New Form
Question details
The user needs to resolve an issue where navigating away from a blank, new form record triggers a database engine error stating that the record cannot be found.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Navigating away from a new, incomplete form record after assigning values to bound controls via the Form Current event.
- Observed behavior
- Access incorrectly treats the blank form as a changed record, attempts to save the incomplete data, and throws a database engine error because the record doesn't fully exist yet.
Review your VBA code in the form's Form_Current event to check if you are directly assigning values to bound controls when navigating to a new record.
Use the DefaultValue Property for New Records
Instead of setting the Value property in the Form_Current event, use the DefaultValue property to initialize fields without marking the record as 'dirty' (changed).
When you assign a value directly to a bound control (e.g., ControlName.Value = 0) during the Form_Current event, Access immediately flags the new record as modified. If the user then closes or navigates away from the form without completing other required fields, Access tries to save the incomplete record, resulting in an error.
By setting the DefaultValue property instead, the form displays the initial value but does not consider the record changed until the user actively edits it.
Right-click your form in the navigation pane and select 'Design View'.
Click on the specific field or control (for example, 'Hours_Worked') that requires an initial value.
Press F4 to open the Property Sheet. Go to the 'Data' tab, find the 'Default Value' property, and enter your desired value (e.g., "0").
If you prefer to set this dynamically, modify your VBA code to use the DefaultValue property instead of Value. For example: Me.Hours_Worked.DefaultValue = "0".

Implement the Form_Undo Event to Clear Temporary Values
Clear any programmatic changes made to a new record when the user cancels or undoes the record creation.
Looking for a Reliable Office Suite? Try WPS Office
While Microsoft Access is a specialized database tool, managing exported database reports, data tables, and everyday documentation is easier with a lightweight office suite. WPS Office provides a complete, free alternative to Microsoft Office for all your word processing, spreadsheet, and presentation needs.

Frequently Asked Questions
Why does Access think my blank new record is already changed?
When VBA code (such as in the Form_Current event) assigns data to a bound control's Value property, Access immediately marks the entire record as "dirty" or modified. This forces the database engine to attempt a save when you leave the record, even if it is incomplete.
What is the difference between DefaultValue and Value in Microsoft Access?
The Value property directly modifies the actual data stored in the record, which triggers a save state. The DefaultValue property only provides an initial suggestion in the UI for new records; it does not mark the record as modified until the user manually interacts with it.
How can I safely initialize multiple fields for a new form record?
You can safely initialize multiple fields by setting the DefaultValue property for each respective control. You can do this manually in the form's Property Sheet under the Data tab, or programmatically via VBA by assigning strings, such as Me.ControlName.DefaultValue = "YourValue".




