UB said:
Is there a way to write VB code to query a table in one
database and join it using a common ID field to another
table in another database
The quick answer is "no"
ADO recordset, command, and connection objects support only one
connection. To get a table joined with another table of a different
database would require two separate connections.
If both databases are in a single server of, say, SQL Server, then you
would be able to construct a view on the server and have access link to
that view as if it were a table.
However,
you CAN link to each table of the disparate databases. Then you can
refer to those linked tables and use the 'CurrentProject.Connection' as
the connection. That way, Access will execute the 'Join' not one of the
servers.
Do you know how to link to tables in other databases?
Doug