logo
search
Others

How to Troubleshoot Microsoft Access Reserved Error (-2037) and ODBC Failures

Muhammad TalhaMuhammad Talha Oct 9, 2026 869 views

Question details

The user needs to resolve Microsoft Access Reserved Error (-2037) and associated ODBC connection failures.

How to Troubleshoot Microsoft Access Reserved Error (-2037) and ODBC 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 you start

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.

Solution 1Recommended

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.

1
Open the VBA Editor

Open your database in Microsoft Access and press Alt + F11 to launch the Visual Basic for Applications (VBA) Editor.

2
Compile the Database

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.

3
Access Database Tools

Close the VBA Editor and navigate to the Database Tools tab located on the main Access ribbon.

4
Compact and Repair

Click on Compact and Repair Database to optimize the file and fix potential structural corruption.

Compile VBA Code and Run Compact and Repair
Bypass Startup Scripts: If you cannot open the database normally due to the error, hold down the Shift key while opening the file to bypass startup scripts and auto-executing macros.
Free Microsoft Office alternative

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.

Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint (.pptx) formats.Free, lightweight suite that uses minimal system resources compared to traditional Office suites.Advanced spreadsheet functions and data analysis tools for everyday data management.Familiar, tabbed user interface for a zero-learning-curve transition.
microsoft office alternative - wps office

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.