Hi everyone,
I have got the following query:
This code give mi names of tables stored in a database.
It works when I run it under MSAccess 2010, but it does not in MS Excel while the code connects itself to the database.
There is seamless operation between Excel files and Ms Access as the rest of the queries work fine.
When I perform a connection to the database on the line :
I get an error:
Thank you in advance for any suggestions you come up with.
Cheers!
I have got the following query:
Code:
sSql = "SELECT MSysObjects.ForeignName, MSysObjects.Name" & _
"FROM MSysObjects" & _
"WHERE (((MSysObjects.Name) Not Like ""*_ChangeLog*"") AND ((MSysObjects.Type)=6))"
It works when I run it under MSAccess 2010, but it does not in MS Excel while the code connects itself to the database.
There is seamless operation between Excel files and Ms Access as the rest of the queries work fine.
When I perform a connection to the database on the line :
Code:
....
Set dbrs = New ADODB.Recordset
dbrs.Open Source:= sSql, ActiveConnection:=dbcon
....
Code:
Run-time error '-blabla'
Automation error
Cheers!
Last edited: