DLookup (1 Viewer)

rothjm

Registered User.
Local time
Today, 14:43
Joined
Jun 3, 2003
Messages
46
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)
 

rothjm

Registered User.
Local time
Today, 14:43
Joined
Jun 3, 2003
Messages
46
In case anyone comes across this in future searches:

Something like this:
varNextIP = DLookup("[IP_04]", _
"tblNet", _
"[IP_01] = " & intIP1 _
& " And [IP_02] = " & intIP2 _
& " And [IP_03] = " & intIP3)
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 05:43
Joined
Oct 28, 2001
Messages
2,499
I quite often refer to this....

Dave
 

Attachments

  • dlookup.zip
    3.9 KB · Views: 178

Users who are viewing this thread

Top Bottom