Fix Access Error 3170 When Linking Azure SQL Tables with VBA
Question details
The user needs to link Azure SQL tables in Microsoft Access using VBA without a DSN and resolve error 3170.

- Product
- Microsoft Access and Azure SQL Database
- Device & OS
- not provided
- Scenario
- VBA creates DSN-less linked tables to an Azure SQL database.
- Observed behavior
- Access reports error 3170, 'Could not find installable ISAM,' although the connection string works for pass-through queries.
Check which SQL Server ODBC driver is installed and whether its architecture matches Access. Have the Azure SQL server, database, schema, table name, and authentication details available.
Check the DAO reference and DSN-less ODBC link
Use this approach when a pass-through query connects successfully but creating a linked table returns error 3170.
A linked table needs a DAO TableDef with an ODBC connection string and a separate source table name. A connection that works for a pass-through query may still need changes before it can be used to create the link.
Open the VBA editor with Alt+F11, select Tools > References, and check for a missing reference. Ensure the Microsoft Office Access database engine object library or the appropriate DAO library is available.
Open ODBC Data Sources for the same 32-bit or 64-bit architecture as Access and check the Drivers tab. Use the exact installed driver name in the connection string, such as ODBC Driver 18 for SQL Server.
In the VBA editor, inspect the code that calls CurrentDb.CreateTableDef. Set the TableDef's Connect property to an ODBC-prefixed string, for example: ODBC;DRIVER={ODBC Driver 18 for SQL Server};SERVER=tcp:your-server.database.windows.net,1433;DATABASE=your-database;Encrypt=yes;TrustServerCertificate=no;. Add authentication settings appropriate to your environment.
Set the TableDef's SourceTableName to the schema-qualified Azure SQL table, such as dbo.YourTable, then call CurrentDb.TableDefs.Append with the TableDef. Confirm the server, database, schema, table name, encryption, and authentication settings match the target database.
Open the new linked table from the Access Navigation Pane before testing the form. If it still fails, review the exact driver name and connection string used by the TableDef.

Compile VBA and check variable declarations
Use this check to find undeclared or incorrectly scoped variables that affect the linked-table code.
Use WPS Office for Everyday Document and Spreadsheet Work
WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Microsoft Office formats, making it easy to move everyday document and spreadsheet work. It does not fix Access error 3170 or replace Access linked tables.

Frequently Asked Questions
Why does my pass-through query work but the linked table fail?
A DAO linked table uses a TableDef with an ODBC-prefixed Connect property and a separate SourceTableName. Check those properties and the installed driver name rather than assuming the pass-through query's setup can be reused unchanged.
How do I find the correct ODBC driver name?
Open ODBC Data Sources for the same architecture as Access and look on the Drivers tab. Copy the installed SQL Server driver name into the DRIVER setting of the linked-table connection string.
How can I find undeclared variables in the linking code?
In the VBA editor, add Option Explicit to each existing module and select Debug > Compile. Enable Tools > Options > Editor > Require Variable Declaration for new modules.
Should I investigate a slow form before fixing error 3170?
First open the linked table directly from the Access Navigation Pane to confirm the link works. If the form remains slow, compare the underlying query in SQL Server Management Studio and test whether other users or locations experience the same delay.




