Friggin_Lazy
asked on
Query Two Tables in seperate databases
Hello Everyone
Say i have two Access databases:
Database1.accdb
Database2.accdb
I'm within Excel i'm using VBA:
I can connect to one database by using:
Set objConnection = New ADODB.Connection
objConnection.Mode = adModeRead
objConnection.Open connectionString
sqlString = "SELECT * FROM Table1"
Set objRecordSet = objConnection.Execute(sqlS tring)
however, is it possible to connect to two seperate databases...
to do a join query?
thanks in advance..
Say i have two Access databases:
Database1.accdb
Database2.accdb
I'm within Excel i'm using VBA:
I can connect to one database by using:
Set objConnection = New ADODB.Connection
objConnection.Mode = adModeRead
objConnection.Open connectionString
sqlString = "SELECT * FROM Table1"
Set objRecordSet = objConnection.Execute(sqlS
however, is it possible to connect to two seperate databases...
to do a join query?
thanks in advance..
It would be easier to do the join query in either Access database and then, open the join query from Excel.
If you could do this in Access, it would be much simpler - just link both tables, and then you can work with them as needed. Using ADO from Excel, you'd not be able to join two tables from different data sources.
Create a third database that has these two tables attached to it. Then you can run your join query against this new database. You can create the database and attach tables manually or with ADOX.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for my delay. This solution did it.. THANK YOU!