Link to home
Start Free TrialLog in
Avatar of Lawrence Salvucci
Lawrence SalvucciFlag for United States of America

asked on

DLookup Question

I am trying to use a DLookup with multiple criteria's but it's not working correctly. Can anyone take a look and see where I went wrong with the criteria's? I am trying to  match up the Employee's Name and a date field.


=DLookUp("[Wage]","qryWageLastMax","[EmpName]= " & Nz([cboEmpName],0) And "[WageDate]< " & [txtWageDate])

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lawrence Salvucci

ASKER

Thank you very much Crystal! That worked perfectly! I get confused with all the double quotes and single quotes. :)
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

you're welcome - happy to help ;)

if you are using double quotes to specify the criteria, then you can use single quotes inside that to delimit a text value UNLESS the text might have ' ... in which case, substitute "" (2 double quote marks) for each of the single quote marks ~