Create a DSN-Less SQL Server Connection in Access 2016
Question details
Connect an Access 2016 front end to SQL Server without creating an ODBC data source name on each client.

- Product
- Microsoft Access 2016
- Device & OS
- not provided
- Scenario
- An Access front end uses linked tables to access a SQL Server back end over a WAN.
- Observed behavior
- The user wants clients to connect through linked-table connection strings rather than individually configured DSNs.
Confirm the SQL Server name, database name, table name, authentication method, and network access. Install a compatible Microsoft ODBC Driver for SQL Server on each client, matching the bitness of Access, and verify that users have the necessary database permissions.
Create a DSN-less linked table with VBA
Store the SQL Server connection details in an Access linked table so clients do not need a configured DSN.
Access 2016 supports DSN-less SQL Server connections through the Connect property of a linked TableDef. The ODBC driver must still be installed on each client.
The example uses Windows integrated authentication and Microsoft ODBC Driver 18 for SQL Server. Replace the server, database, and table names with your own values.
Open the Access front-end database, press Alt+F11, and select Insert > Module.
Paste this procedure into the module: Public Sub CreateDsnlessLink() Dim db As DAO.Database Dim tdf As DAO.TableDef Set db = CurrentDb Set tdf = db.CreateTableDef("Customers") tdf.Connect = "ODBC;DRIVER={ODBC Driver 18 for SQL Server};" & _ "SERVER=your-server;DATABASE=your-database;" & _ "Trusted_Connection=Yes;" tdf.SourceTableName = "dbo.Customers" db.TableDefs.Append tdf End Sub
Replace the example values, then place the cursor inside CreateDsnlessLink and press F5. In Access, open the new Customers table from the Navigation Pane to test the connection.
Distribute the front end with the linked table, then open the table on each client to verify driver availability, authentication, and WAN connectivity.

Use WPS Office for everyday office files
WPS Office is a free, lightweight alternative for documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format support make it easy to move everyday files, but it does not replace Access or configure its DSN-less SQL Server connections.

Frequently Asked Questions
Does a DSN-less connection eliminate the need for an ODBC driver?
No. Each client still needs the driver named in the linked table's Connect property. Install a compatible driver whose bitness matches the Access installation.
Where does Access store the connection information?
Access stores it in the linked table's TableDef.Connect property in the front-end database. The string specifies details such as the driver, server, database, and authentication method.
Why does the connection fail after installing ODBC Driver 18?
Check that the driver name in the connection string matches the installed driver and that Access and the driver have matching bitness. Driver 18 also encrypts connections by default, so verify that the SQL Server certificate is trusted and matches the server name.
Can I use SQL Server authentication instead of Windows authentication?
Yes. Use an appropriate SQL Server authentication connection string instead of Trusted_Connection=Yes, and ensure the account has permission to access the database. Avoid embedding passwords in VBA or distributing them in the front end.




