Simple dlookup alternative question

cheuschober

Muse of Fire
Local time
Yesterday, 23:24
Joined
Oct 25, 2004
Messages
168
Hey. Not a skilled vba user but needing something done right so here I am.

Basically, I'm in need of a string variable that is sourced from a query joining two fields. The join merely provides supplies an 'abbr' (abbreviated name) to a number 'id' from a forgein table.

I did some reading and it seemed to me that people use dlookup's in these types of actions so I created the following:

Code:
DLookup("[Abbr]", "lkup_Colleges", "[Id] = [CONTROL_QRY_010]![MinOfCol_Id]")

But then I read in visual basic helpd after it errors that my limiting criteria must be in the domain which, of course it isn't because it's in another table.

The ID field in my control query only has one record so only one record is produced. I'm certain there's a way to go about this but have no idea what it is.

So what's the alternative?

Thanks all,
~Chad
 
I'm I understand correctly - but

- could you not put all the fields into one query - ie the calculated field you want to return and the fields you want to use as criteria - then use the Dlookup on that query.
 
Easy enough. ;)

Thanks for the help.
~Chad
 

Users who are viewing this thread

Back
Top Bottom