Dlookup Multiple Criteria

tucker61

Registered User.
Local time
Today, 09:34
Joined
Jan 13, 2008
Messages
344
I have been struggling with this for a couple of hours now.

I have a value that is a dloopkup. the lookup works on when i am only trying to lookup based on one value, but i just cant get teh cdoe right to look at 2 values.

Here are my individual Dlookups.. Can someone change this to that the SumofQty_Due is dependant on Cboxoption AND CboxContract.

thanks in advance.

Code:
=Nz(dlookup("sumofqty_Due","Temp_Deliveries_Last_30","Option='" & [cboxoption] & "'"),"")
=Nz(dlookup("sumofqty_Due","Temp_Deliveries_Last_30","Contract= [cboxcontract]"),"")
 
Maybe
=Nz(dlookup("sumofqty_Due","Temp_Deliveries_Last_30","Option='" & [cboxoption] & "' AND Contract= "& [cboxcontract]"),"")
 
Can someone change this to that the SumofQty_Due is dependant on Cboxoption AND CboxContract.

thanks in advance.

Code:
=Nz(dlookup("sumofqty_Due","Temp_Deliveries_Last_30","Option='" & [cboxoption] & "'"),"")
=Nz(dlookup("sumofqty_Due","Temp_Deliveries_Last_30","Contract= [cboxcontract]"),"")
try:
Code:
(dlookup("sumofqty_Due","Temp_Deliveries_Last_30","Option=" & [cboxoption] & )
but if you're using a combo box in a form instead of an actual table field, you have to reference it! =)
Code:
"field = " & forms!formName!controlName!
 
See the examples in the Similar Threads at bottom of the page
 

Users who are viewing this thread

Back
Top Bottom