Import Query from Access - Bug
I have this code:
Dim Data1 As ADODB.Recordset
Dim Connect As String
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\db1.mdb;"
Set Data1 = New ADODB.Recordset
Data1.Open "[Test Q]", Connect
Sheets(1).Range("A1").CopyFromRecordset Data1
The Query "Test Q" works in Access and I get an output there. But when I run
it in here, nothing is copied over. The script works if I put a table in
there. Why is this happening?
|