Somewhat complex DLookup question

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

Guest

DLookup("
Code:
", "[Codefile]", "[County] = '" & [County] & "'" works just
fine, but I need to also compare [State] with [State] because different
states have the same county name. I tried adding AND logic, but I must not be
doing it right. Help?
 
Try

DLookup("
Code:
", "[Codefile]", "[County] = '" & [County] & "' And [State]
='" & [State] & "'")
 
Thank you, that did it...all those quotes were crossing my eyes :>)

Ofer Cohen said:
Try

DLookup("
Code:
", "[Codefile]", "[County] = '" & [County] & "' And [State]
='" & [State] & "'")

--
Good Luck
BS"D


[QUOTE="Gene"]
DLookup("[Code]", "[Codefile]", "[County] = '" & [County] & "'" works just
fine, but I need to also compare [State] with [State] because different
states have the same county name. I tried adding AND logic, but I must not be
doing it right. Help?[/QUOTE][/QUOTE]
 
Back
Top