Dlookup help Please !!

  • Thread starter Thread starter Pinacle
  • Start date Start date
P

Pinacle

Could someone help me with the following dlookup code.

=DLookUp("[LateJune2009] ","LeadTime"," [COSTCODE] = [Combo135] and
[MATERIALDESCRIPTION] = '"&[Combo 137]&" ' ")

If i replace 'Combo 137' with a sample description this code is working
fine. I think the problem is with the quotations. Material Description is of
string type.

Additional question: Do i need to modify the above dlookup function if i
have to use it in vba code.

Thanks in Advance !!
 
On Fri, 11 Sep 2009 21:21:01 -0700, Pinacle

I would write that third argument along these lines:
"CostCode=" & cboCostCode & " and MatlDescr='" & cboMatlDescr & "'"

Name your comboboxes something sensible.
All uppercase object names are harder to read.

-Tom.
Microsoft Access MVP
 
Back
Top