V
Van T. Dinh
It sounds to me that you are using MDB (and NOT ADP) with
an SQL Server Back-End. In this case the
CurrentProject.Connection points to JET Engine (of the
Front-End) and NOT the SQL Server which you need. Also,
you should use the OLEDB Provider / Connection String for
MS-SQL Server rather than for ODBC Databases (ODBC is
considered obsolete by Microsoft). See:
<http://www.able-
consulting/MDAC/ADO/Connection/OLEDB_Providers.htm>
for suitable OLEDB Privider for MS-SQL Server
Note also that the "ODBC Connect Str" used in Pass-Through
Queries is different from the Connection String for OLEDB
Provider, even OLEDB Provider for ODBC Databases.
HTH
Van T. Dinh
MVP (Access)
an SQL Server Back-End. In this case the
CurrentProject.Connection points to JET Engine (of the
Front-End) and NOT the SQL Server which you need. Also,
you should use the OLEDB Provider / Connection String for
MS-SQL Server rather than for ODBC Databases (ODBC is
considered obsolete by Microsoft). See:
<http://www.able-
consulting/MDAC/ADO/Connection/OLEDB_Providers.htm>
for suitable OLEDB Privider for MS-SQL Server
Note also that the "ODBC Connect Str" used in Pass-Through
Queries is different from the Connection String for OLEDB
Provider, even OLEDB Provider for ODBC Databases.
HTH
Van T. Dinh
MVP (Access)