This might help:
SELECT tblAddresses.PersonID, tblAddresses.City, tblPeople.FirstName,
tblPeople.LastName
FROM [F:\Data.mdb].tblAddresses INNER JOIN tblPeople ON
tblAddresses.PersonID = tblPeople.PersonID;
tblAddresses is a table on the remote database on another server that, is
mapped to the F: Drive There is no link, just the path to the database and
the table which by itself looks like:
[F:\Data.mdb].tblAddresses
tblPeople is a local table in the database we are running the query from.
You can also run separate queries in Access (not in VB because you need the
Access Expression Service) Like this:
SELECT tblPeople.PersonID, tblPeople.FirstName, tblPeople.LastName
FROM [Z:\Data2.mdb].tblPeople;
and save it as Query1, then:
SELECT tblAddresses.PersonID, tblAddresses.City
[F:\Data1.mdb].tblAddresses
and save it as Query2, then:
SELECT Query1.PersonID, Query1.City, Query2.FirstName, Query2.LastName
FROM Query1 INNER JOIN Query2 ON Query1.PersonID = Query2.PersonID;
The above is joining 2 queries run on 2 separate tables from 2 separate
unlinked databases running on 2 different servers which are mapped to drive
letters on a third machine. AFAIK, only Access can do something like that!
BTW, this was tested using 3 machines on my network running databases tables
with 20K rows in the address table and 5100 rows in the people table and it
returned the matched records in about 1.5 or 2 seconds.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
Özden Irmak said:
Hello Arvin,
Thanks for your both replies by the way...
I can open the second database with the proper connection string but I
didn't understand how to merge them to make a single recordset