I have an Access 2002 database that I have linked to an SQL 2008 database. This is a new link and instead of going to 150 user pc's and creating an ODBC connection manually, I would like to create the connection in the Main form of my Access Database. Is this possible? The only thing I can find is the connection string and I get errors of incorrect syntax. Below is the code I placed in the Load area of my main form.....
Driver={SQL Server Native Client 10.0};Server=CTIDATA;Database=Jobs;Trusted_Connection=yes;
I have also tried:
Dim conn As AODBC.Connection
Dim rst As ADODB.Recordset
Dim sql As String
conn.Open "Driver={SQL Server};" & _
"Server=CTIDATA;" & _
"Database=Jobs;" & _
"UID=;" & _
"PWD=;"
I get a "compile error" user define type not defined..
Any help would be appreciated.
Driver={SQL Server Native Client 10.0};Server=CTIDATA;Database=Jobs;Trusted_Connection=yes;
I have also tried:
Dim conn As AODBC.Connection
Dim rst As ADODB.Recordset
Dim sql As String
conn.Open "Driver={SQL Server};" & _
"Server=CTIDATA;" & _
"Database=Jobs;" & _
"UID=;" & _
"PWD=;"
I get a "compile error" user define type not defined..
Any help would be appreciated.