How to Troubleshoot Microsoft Access Reserved Error (-2037) and ODBC Failures
Question details
The user needs to resolve Microsoft Access Reserved Error (-2037) and associated ODBC connection failures.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Attempting to run a database application, form, or macro that connects to an external data source via ODBC.
- Observed behavior
- The application throws Reserved Error (-2037) or an ODBC connection failure, preventing normal database operations or external data retrieval.
Before compiling your VBA code or altering database objects, verify that you have the correct administrative privileges in Windows and ensure that your target external database server is currently online and accepting connections.
Compile VBA Code and Run Compact and Repair
Identifying syntax errors in your VBA project and repairing database structure is the most effective way to resolve Error -2037.
The Reserved Error (-2037) is often triggered by faulty VBA code, corrupt event procedures, or broken macros. Because the error message is generic, isolating the exact cause requires checking the code and optimizing the database.
Open your database in Microsoft Access and press Alt + F11 to launch the Visual Basic for Applications (VBA) Editor.
In the VBA Editor menu, click on Debug and select Compile [Your Database Name]. Identify and fix any code syntax errors highlighted by the compiler.
Close the VBA Editor and navigate to the Database Tools tab located on the main Access ribbon.
Click on Compact and Repair Database to optimize the file and fix potential structural corruption.

Isolate Faulty Database Objects
Manually identify which specific form, macro, or startup object is causing the failure if compiling code does not help.
Troubleshoot the ODBC Connection
Resolve separate ODBC connection failures by verifying and updating external data source configurations.
Switch to WPS Office for Seamless Document and Data Management
While Microsoft Access handles complex relational databases, WPS Office provides a lightweight, free, and highly compatible suite for managing data through powerful spreadsheets, documents, and presentations.

Frequently Asked Questions
Why do I get a Reserved Error in Microsoft Access?
A Reserved Error in Access (like -2037) typically means the program has encountered an internal failure it cannot specifically identify. It is most commonly caused by corrupt database objects, faulty VBA code, or errors in startup macros.
How can I bypass startup errors to open my Access database?
You can bypass startup options and auto-executing macros by holding down the Shift key while double-clicking your Access database file. This allows you to enter the database workspace and troubleshoot faulty forms.
What should I do if the ODBC connection test fails?
If the ODBC connection test fails in the Data Source Administrator, ensure that the external database server is online, your network firewall is not blocking the connection port, and you have the correct ODBC driver installed for your specific data source.
Does the Compact and Repair tool fix VBA code errors?
No, Compact and Repair fixes database structural corruption and reclaims unused space. To fix VBA code errors, you must open the VBA Editor, run the Compile tool, and manually correct any highlighted syntax or logic errors.




