DLookup multiple Criteria

DJ_DEF_CON_1

Registered User.
Local time
Today, 02:40
Joined
Jan 1, 2003
Messages
40
I keep getting a syntax error for the following. Could someone look it over and see if they can figure out what I am doing?

=DLookup("CONV_FACTOR","DM_PLUS_ITEMCONFIG_UOM", ("ITEM_NUM = ITEM_NUM") And ("DFLT_CONFIG = CONFIG") And (“UOM_TYP_TXT = “PAL"”))
 
Try:

=DLookup("CONV_FACTOR","DM_PLUS_ITEMCONFIG_UOM", "ITEM_NUM = " & ITEM_NUM & " And DFLT_CONFIG = " & CONFIG & " And UOM_TYP_TXT = '" & PAL &"')"

Assuming that ITEM_NUM, CONFIG & PAL are variables or something like that ...
 
Code:
=DLookup("CONV_FACTOR", "DM_PLUS_ITEMCONFIG_UOM", "[ITEM_NUM] = " & ITEM_NUM & " And [DFLT_CONFIG] = " & CONFIG & " And UOM_TYP_TXT = 'PAL'”)

I am assuming that ITEM_NUM is a field in the referenced table as well as a control in the current object, and DFLT_CONFIG is also a field in the table, CONFIG is a control in the current object, and you want to check if UOM_TYP_TXT contains a value of "PAL" as opposed to a field named PAL.

...looks like pdx_man and myself replied at the same time...
 
Thanks - That solves the problem


RichO said:
Code:
=DLookup("CONV_FACTOR", "DM_PLUS_ITEMCONFIG_UOM", "[ITEM_NUM] = " & ITEM_NUM & " And [DFLT_CONFIG] = " & CONFIG & " And UOM_TYP_TXT = 'PAL'”)

I am assuming that ITEM_NUM is a field in the referenced table as well as a control in the current object, and DFLT_CONFIG is also a field in the table, CONFIG is a control in the current object, and you want to check if UOM_TYP_TXT contains a value of "PAL" as opposed to a field named PAL.

...looks like pdx_man and myself replied at the same time...
 

Users who are viewing this thread

Back
Top Bottom