Table of contents
Collapse the table of content
Expand the table of content

SourceConnectStr, SourceDatabase Properties

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Applies to: Access 2013 | Access 2016

You can use these properties to access external data when you can't link the external tables to your database.

  • The SourceConnectStr property specifies the name of the application used to create an external database.

  • The SourceDatabase property specifies the external database in which the source tables or queries for a query reside.

Note The SourceConnectStr and SourceDatabase properties apply to all queries except data-definition, pass-through, and union queries.


You use a string expression to set the value of the SourceConnectStr and SourceDatabase properties.

You can set these properties in the query's property sheet or in SQL view of the Query window. In the SQL statement, the properties correspond to the IN clause.

Note If you are accessing multiple database sources, use the Source property instead of the SourceConnectStr and SourceDatabase properties.


You must use the SourceConnectStr and SourceDatabase properties to access tables from external databases that were created in applications that don't use linked tables.

The following are examples of these property settings:

  • For a Microsoft Access database, the SourceDatabase property setting is the path and database name (for example, C:\Accounts\Customers). Microsoft Access adds the file name extension automatically. The SourceConnectStr property doesn't have a value for a Microsoft Access database.

  • For a database created by a product such as Paradox, the SourceDatabase property setting is the path (for example, C:\Pdoxdata). The SourceConnectStr property setting is the specifier for the database type (for example, Paradox 3.x;). For a list of specifiers, see the DAO Connect property.

  • The following example uses dBASE IV tables in the C:\Dbdata directory as the source of data for the query.

FROM Customer INNER JOIN Orders 
IN 'C:\Dbdata'[dBASE IV;];
  • For an Open Database Connectivity (ODBC) database, the SourceConnectStr property setting is the name of the source database and any additional information required by the product, such as a logon identification (ID) and password. For example, for a Microsoft SQL Server database the setting might be:

The SourceDatabase property doesn't have a value for an ODBC database.

Access for developers forum on MSDN
Access help on
Access help on
Search for specific Access error codes on Bing
Access forums on UtterAccess
Access wiki on UtterAcess
Access developer and VBA programming help center (FMS)
Access posts on StackOverflow

© 2018 Microsoft