Dlookup() for taking values from 3combo boxes.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a form with 3 combo boxes. Based on the selection made in these 3
combos,I would like the user to see certain details.
Previously, i used a dlookup function to find values reading the selection
of 2 combos...I tried to extend the function with 3 combos.....although the
system doesnt turn up a syntax errr, it returns an error in the text box,
where i am supposed to see the values..

heres the code i used

=DLookUp("[Reference_price]";"archive2";"[DealID]= '" & Forms!AREA!Combo38 &
"' AND [Model-Nr]= '" & Forms!AREA!Combo36 & "' AND [Changed On]= '" &
Forms!AREA!Combo22 & "''")
until the second combo, it works...any idea what i can do?!?
thanks for ur help
joshua
 
If [Changed On] is a Date/time field, you need to use # as the delimiter.
Also, the date must be formatted as mm/dd/yyyy in the criteria; if that's
not what your default is, you can force it in the criteria string, thus:

... AND [Changed On]= #" & Format(Forms!AREA!Combo22,"mm/dd/yyyy") &
"'#")

HTH,

Rob
 
Back
Top