How to Fix Access Error 3024 When Connecting to SQL Server
Question details
The user needs to resolve run-time error 3024 occurring when Microsoft Access attempts to connect to a SQL Server database via VBA code.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Connecting an Access database to SQL Server using DAO or ADO connection strings via an ODBC driver.
- Observed behavior
- Microsoft Access throws run-time error 3024, often triggered by using an outdated legacy SQL Server driver or by mixing DAO and ADO objects improperly.
Ensure you have administrative privileges to install new ODBC drivers on your Windows machine, and verify that you have your exact SQL Server name and database credentials ready.
Install and Configure Microsoft ODBC Driver 17 for SQL Server
Update your legacy SQL Server driver to ODBC Driver 17 to ensure a secure, stable, and error-free database connection.
The outdated Driver={SQL Server} included with older Windows versions is a frequent cause of connection errors in Microsoft Access. Upgrading your driver and updating the connection string will resolve compatibility and certificate issues.
Visit the official Microsoft download page for ODBC Driver 17 for SQL Server. If you are running a 64-bit version of Windows, download the x64 installer, regardless of whether your Office installation is 32-bit or 64-bit.
Double-click the downloaded MSI installer package and follow the on-screen prompts to complete the installation.
Open the Visual Basic Editor in Access (ALT + F11). Locate the database connection string in your VBA code and replace the legacy Driver={SQL Server} segment with DRIVER={ODBC Driver 17 for SQL Server}.
Ensure that your new connection string incorporates the correct parameters for modern SQL Server environments, specifically Trusted_Connection=Yes and TrustServerCertificate=Yes.

Standardize DAO and ADO Objects in VBA
Prevent run-time conflicts by ensuring your VBA procedures do not improperly mix DAO and ADO data objects.
Looking for a Free and Lightweight Alternative to Microsoft Office?
Dealing with complex database connection errors and driver compatibility issues can be frustrating. If your daily workflow focuses primarily on robust word processing, spreadsheet data analysis, and presentations, WPS Office is an excellent, free alternative. It provides exceptional compatibility with Microsoft Word, Excel, and PowerPoint formats without the heavy system requirements.
- 1. Download WPS Office: Visit the official WPS website to download the free installation package tailored for your operating system.
- 2. Install the software: Run the installer and follow the straightforward setup instructions to get WPS Office running on your computer.
- 3. Analyze your data seamlessly: Use WPS Spreadsheets to open your exported database tables and reports for quick data manipulation without worrying about complex ODBC driver configurations.

Frequently Asked Questions
What causes MS Access run-time error 3024?
Error 3024 typically occurs because Microsoft Access cannot find the file or data source specified. When connecting to SQL Server, it is usually triggered by using an outdated legacy ODBC driver or if the database name and server path in your connection string are incorrect.
Can I use the 64-bit ODBC driver with 32-bit Microsoft Access?
Yes. If you are running a 64-bit Windows operating system, you should install the x64 version of the Microsoft ODBC Driver 17 for SQL Server. It will function correctly regardless of whether your Microsoft Office installation is 32-bit or 64-bit.
Why does mixing DAO and ADO cause connection errors in Access?
Data Access Objects (DAO) and ActiveX Data Objects (ADO) are two distinct data access technologies within VBA. Mixing an ADO connection with a DAO recordset causes a conflict because they utilize different object libraries and memory structures to handle data, resulting in immediate run-time errors.
How do I verify my SQL Server connection string in Access?
Open the Visual Basic Editor (ALT + F11), locate your connection string variable, and ensure it correctly references the updated driver (e.g., DRIVER={ODBC Driver 17 for SQL Server}). Additionally, double-check your SERVER, DATABASE, and certificate authentication parameters.




