How to Fix Microsoft Access Crashing on Recordset AddNew or Edit
Question details
Microsoft Access crashes unexpectedly when assigning values to a recordset field using the AddNew or Edit methods in VBA.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Running VBA code to add or edit database records via a recordset.
- Observed behavior
- The application crashes entirely when the code executes the field assignment step during an AddNew or Edit operation, even in newly created databases.
Ensure you have created a complete backup copy of your Microsoft Access database file before modifying VBA code or attempting to decompile it, to prevent permanent data loss.
Reinstall Microsoft 365 Office
A corrupted Office installation is the most common cause of persistent VBA crashes in Access. Reinstalling Microsoft 365 will restore essential background library files.
When MS Access crashes constantly on standard VBA operations across both existing and newly created databases, the underlying Microsoft Office library components are likely damaged.
Press the Windows key, search for 'Control Panel', and navigate to 'Programs' > 'Programs and Features'.
Locate Microsoft 365 or your specific Microsoft Office version in the installed programs list, right-click it, and select 'Uninstall'. Follow the on-screen prompts.
Log in to your Microsoft account online, download the latest Office installer, and run it to perform a clean installation.

Explicitly Qualify DAO Object Declarations in VBA
Ambiguous object declarations can cause Access to reference the wrong data library (like ADO instead of DAO), leading to runtime crashes. Qualifying them specifically as DAO objects ensures correct binding.
Decompile and Compile the Access Database
Decompiling removes corrupted compiled VBA code states, forcing Microsoft Access to generate a fresh, clean compiled state the next time the database runs.
Experience a Faster, Crash-Free Office Suite with WPS Office
While Microsoft Access is used for complex databases, large MS Office 365 installations are prone to library corruption that causes recurring app crashes. If you frequently encounter MS Office errors, consider switching your document, spreadsheet, and presentation tasks to WPS Office. It provides a lightweight, highly compatible alternative for everyday productivity without the heavy system burden.

Frequently Asked Questions
Why does Microsoft Access crash specifically on the AddNew or Edit VBA lines?
This specific crash typically occurs when the VBA engine attempts to write to the underlying database engine using corrupted MS Office library files. It can also happen when there is an ambiguous object reference, causing the system to mistakenly invoke ADO methods instead of the intended DAO ones.
What is the difference between ADO and DAO in Access VBA?
DAO (Data Access Objects) is optimized specifically for Microsoft Access databases utilizing the ACE/JET engine. ADO (ActiveX Data Objects) is designed for broader data sources like SQL Server. Failing to qualify variables 'As DAO.Recordset' can cause Access to apply ADO references incorrectly, triggering crashes.
Will running an Office Repair fix the Access VBA crash instead of a full reinstall?
Running an 'Online Repair' from the Windows Control Panel can sometimes resolve missing components. However, if the crash persists even in newly created databases, a clean uninstall and reinstall of Microsoft 365 is the most reliable way to refresh the corrupted library files.




