How to Fix MS Access Update or CancelUpdate Without AddNew or Edit Error
Question details
The user is encountering a runtime error in Microsoft Access when attempting to modify or add records to a form or subform.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Running VBA code to update records in an Access database, often involving form requery operations.
- Observed behavior
- Microsoft Access displays an "Update or CancelUpdate without AddNew or Edit" error, blocking the record update process.
Before modifying your database structure or VBA code, ensure you create a backup copy of your Microsoft Access file to prevent accidental data loss during troubleshooting.
Verify VBA Record State and Remove Premature Requery
This resolves the most common cause where code attempts to save data without initiating an add/edit state, or where a requery interrupts the update.
When modifying records via VBA, Access requires explicit commands to enter an edit or add state before assigning values. Additionally, forcing a form requery while a record is being updated will break the process and trigger this error.
Press ALT + F11 in Microsoft Access to open the VBA editor and locate the procedure triggering the error.
Verify that your code explicitly calls '.AddNew' (for new records) or '.Edit' (for existing records) on the recordset before assigning any field values.
Look for any 'Form.Requery' or 'Me.Requery' commands that execute before the '.Update' command has finished.
Comment out or temporarily remove the 'Form.Requery' line. If a requery is necessary, move it so it executes strictly after the '.Update' method has successfully completed.
Save your VBA code, return to your Access form, and trigger the event again to confirm the error is resolved.

Verify Subform Binding and Link Fields
Incorrectly linked parent and child fields in subforms can also trigger state errors when attempting to insert new records.
Looking for a Lighter, Free Alternative to Microsoft Office?
While Microsoft Access is a powerful tool for complex databases, most daily productivity tasks require only robust word processing, spreadsheets, and presentations. WPS Office offers a free, lightweight suite with a familiar interface that handles all your standard office files seamlessly.

Frequently Asked Questions
What does the 'Update without AddNew or Edit' error mean in MS Access?
This runtime error occurs when your VBA code attempts to save changes to a recordset using the .Update method, but it hasn't first declared whether it is creating a new record (using .AddNew) or modifying an existing one (using .Edit).
Why does Form.Requery cause record update errors?
Calling a requery operation forces the form to reload its underlying data. If this happens while a record is currently being edited but hasn't been saved yet, it interrupts the active edit state and triggers the CancelUpdate error.
Can I fix this error without using VBA code?
If the error is caused by macro actions rather than VBA, you need to review your macro steps in Design View. Ensure that any 'SaveRecord' or 'Requery' actions are placed in the correct logical order, so a record is fully saved before the form refreshes.




