I have a table full of IP Addresses. There are 3 different ranges. 128, 32, 129. I need to create buttons that when selected, show only one of the ranges of IP Address.
Is the format the range numbers followed by a dot then more numbers e.g. 128. then numbers, 32. then numbers etc.?
Do you want to show it on a form or as a report?
Here is a solution assuming your range is in the format
numbers1.numbers2.numbers3 e.g. 129.345.456 etc.
I have attached a sample database.
I created a function that used the INSTR function to find the location of the first dot. Then used the LEFT function to determine the numbers1. Have a look at the query to see how I used the function.
The form has three option button for your ranges, when a button is selected a temp field is updated with the range value and is used as a critieria in the query.
Please contact me if need assistance or more information
Here is an updated version that looks for an IP range regardless of the location in the IP address. It is only a sample but it may give you some ideas.
Note, this will not work if the selected IP range number is not in the correct location of the IP address or if there are two numbers in the address that are the same as the IP range.