Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to populate a recordset with 2 tables from seperate databases. So
far, I get no error when I run the query, but it's also not populating the field from the second database (which happens to be the one I'm actively in). The query is below: With comboPubs ' Assign the Connection object. .ActiveConnection = cnPubs ' Extract the required records. .Open "select strName from db1_name..TblAnalysisOptions AO join db2_name..TblResultHeader RH on AO.guidAnalysisOptions=RH.guidAnalysisOptions" ' Copy the records into cell A1 on Sheet1. Sheet1.Range("A1").CopyFromRecordset comboPubs ' Tidy up .Close End With Is there anyway to do this? Both our on the same machine. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to access databases from excel using ms query and odbc? | Excel Discussion (Misc queries) | |||
Excel Templates and databases | Excel Programming | |||
Connecting two databases in MS Query | Excel Worksheet Functions | |||
Excel and Databases | Excel Discussion (Misc queries) | |||
Querying 2 databases with one query string | Excel Discussion (Misc queries) |