sanders720
Programmer
I am trying to use an ADO connection to pull data out of another Access database into my current one. This syntax does not seem to run through, as the debug.print statements are not working. Also, should db_file be a string or a database?
Thanks in adnavce for the help...
Private Sub cmdGetData_Click()
Dim conn As ADODB.Recordset
Dim db_file As Database
db_file = "v:\" + Str(Me.cboJobNo.Value) + ".mdb"
Debug.Print db_file
Set conn = New ADODB.Connection
conn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & db_file & ";" & _
"Mode=Read;" & _
"Persist Security Info=False"
Debug.Print conn
Thanks in adnavce for the help...
Private Sub cmdGetData_Click()
Dim conn As ADODB.Recordset
Dim db_file As Database
db_file = "v:\" + Str(Me.cboJobNo.Value) + ".mdb"
Debug.Print db_file
Set conn = New ADODB.Connection
conn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & db_file & ";" & _
"Mode=Read;" & _
"Persist Security Info=False"
Debug.Print conn