Somewhat complex DLookup question

G

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?
 
O

Ofer Cohen

Try

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

Gene

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]
 
Top