I need a DLookup with multiple criteria.
When I do the IP_01 criteria by itself, it works fine. When I try to add another criteria (IP_02), I get a type mismatch error.
Can someone spot the syntax error of my code?
TIA
code:
varNextIP = DLookup("[IP_04]", _
"tblNet", _
"[IP_01] = " & intIP1 And _
"[IP_02] = " & intIP2)
When I do the IP_01 criteria by itself, it works fine. When I try to add another criteria (IP_02), I get a type mismatch error.
Can someone spot the syntax error of my code?
TIA
code:
varNextIP = DLookup("[IP_04]", _
"tblNet", _
"[IP_01] = " & intIP1 And _
"[IP_02] = " & intIP2)