Others

Create a DSN-Less SQL Server Connection in Access 2016

Jason MillerJason Miller Nov 25, 2026 871 views

Question details

Connect an Access 2016 front end to SQL Server without creating an ODBC data source name on each client.

Create a DSN-Less SQL Server Connection in Access 2016
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the VBA editor

Open the Access front-end database, press Alt+F11, and select Insert > Module.

2
Add the linked-table code

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

3
Run and test the link

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.

4
Deploy the front end

Distribute the front end with the linked table, then open the table on each client to verify driver availability, authentication, and WAN connectivity.

Create a DSN-less linked table with VBA
Check encryption and existing table names: ODBC Driver 18 encrypts connections by default; configure SQL Server with a certificate trusted by clients. The example creates a new local linked table named Customers, so choose a different name if one already exists. Windows authentication must also work for the users connecting over the WAN.
Free Microsoft Office alternative

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.

Work with Microsoft Word, Excel, and PowerPoint file formatsUse a familiar interface for everyday office tasksInstall a lightweight office suite with free featuresKeep Access database connection management separate from document and spreadsheet work
microsoft office alternative - wps office

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.