Query with lookup using multiple fields...

here4real

Registered User.
Local time
Today, 03:11
Joined
May 1, 2013
Messages
87
I hope I can explain this clearly... I have a query that based on certain codes in a record does multiple joins to pull in other codes... I want the query (based on these pulled in codes) to do a lookup in another table to extract 1 field that has a description...

Can I do this in one query??? Do I need to do a Make Table to first pull in the codes and then do a second query with a DLookup based on those fields???
 
Probably not the one to provide answers, but.

You can just add another link between the table with the code and the code description table and pull in the description in the same query.
 
Not so simple... The criteria for extracting the one field (description) is based on multiple fields and the value being within a range...

The exact syntax I have right now is:

QARR Desc: Nz(DLookUp([QARR Measure],"QARR Definitions",(([Procedure_Code] Between [QARR Definitions]![CPT Begin] And [QARR Definitions]![CPT End]) And ([Diagnosis_Code]=[QARR Definitions]![ICD9]))),"")

Procedure_Code and Diagnosis_Code were both pulled into the original record....
 
That's why I probably shouldn't have answered, I mostly use the interface, it would be pretty easy there, but I don't know how to translate that to SQL.
 

Users who are viewing this thread

Back
Top Bottom