Filter by IP Address

mboe

Registered User.
Local time
Today, 04:52
Joined
Dec 27, 2000
Messages
51
I am trying to compare IP numbers from a log table to a table of blocked IP addresses. Since IP Address don't lend themselves to comparisons I converted the IP address into a number like this:

(Octet1*256*256*256) + (Octet2*256*256) + (Octet3*256) + Octet4

I can then compare an IP to a block of IP addresses like this:

BlockCheck: IIf(DCount("[ipfrom]","blockedip","[IPStart] <= " & [sourceipc] & " and [ipstop] >= " & [sourceipc] & "")>0,"Blocked","Non-blocked")

Works great....until I want to filter by this field.

I tried adding a "Blocked" field to my log table and run an update query to set if the IP is blocked or not. Then I could filter by that field.

Can't even run an update query based on this field. I have tried this a query and vba. I can not make this work and can't figure out why.
 
I got it working. I think I just needed to error trap some field values.
 

Users who are viewing this thread

Back
Top Bottom