Rowsource for a combobox that refers to another database

cj-1289

Registered User.
Local time
Today, 08:33
Joined
Jun 12, 2009
Messages
29
The Access GUI seems determined that I only pick values or fields that come from the CurrentDb, but I want to refer to a different one. I've been doing my research but found little of use.

Essentially, where
is a table in a different database to the Table/Query RowSourceType combobox, I need my RowSource to be:

SELECT
.[Field1]
.[ID] FROM
ORDER BY [Field1] DESC;

I just don't know how to refer to a table from a different database!

Thanks in advance
 
The simplest thing would be to link to the table. Alternatively, look at the IN clause in Help.
 
Ah, brilliant. Who knew that Access did something that I didn't even need to code in! Perhaps I've been over-relying on VBA and SQL though.

Out of curiosity (and it's simply that because I've copy/pasted 'Set db2 = filepath' all over the place and it's working fine) would I be able to open a recordset using the linked table, as if it were in the CurrentDb?
 
Yes, a linked table will act like a local table in most respects.
 

Users who are viewing this thread

Back
Top Bottom