Replace
> sIP = Split("192.148.255.0")(2)
by
sIP = Split("192.148.255.0", ".")(2)
Notice: I forgot the dot delimiter to the Split() function
-
Krgrds,
Perry
System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
> check VBA help on Split() function
>
[quoted text clipped - 68 lines]
>> Thanks for any tips,
>> cw
jalexander - 22 May 2007 04:21 GMT
Perry, Thanks so much for your help.
I need to apologize in that I posted this question in Forms and not Reports.
Anyway, I looked up the Split function & look forward to trying it out.
What I have is an IP Database with customers already assigned. Some customers
have 1 IP, some 2 and others have 5 or more. I have a button on my form
called "Email IP info" which runs a query, generates my IP Report to PDF and
attaches it to an email. Everything works perfectly except that my code to
auto-generate the Gateway needs refinement.
Here is the text of what my report outputs:
--------------------------------------------------
Total Customer IP Address(s) 2
Customer IP Address #1 64.83.292.17
Subnet Mask 255.255.255.248
Gateway 10.0.0.1
Customer IP Address #2 64.83.292.18
Subnet Mask 255.255.255.248
Gateway 10.0.0.1
---------------------------------------------------
For this report, the second Gateway should have been 64.83.292.17
How do I alter my code in the report to make the second Gateway the first IP
minus 1. ?
I will experiment with the Split function in the meantime.
Thanks again,
cw
>Replace
>> sIP = Split("192.148.255.0")(2)
[quoted text clipped - 16 lines]
>>> Thanks for any tips,
>>> cw