[AccessD] masking question

John Clark John.Clark at niagaracounty.com
Wed Feb 9 12:12:01 CST 2005


Yeah...I didn't know this either. I spotted the octet thing this
morning, but I had hex stuck in my head, so I kept screwing up my
proofs. I have discovered...sorry if this isn't news for anyone else,
but I think it is cool...that I can make the 3-digit nums into 4-digits
with a leading zero and do the same thing.

Anyhow, this was just a spur of the moment project...something I
planned to whip out and enhance, as I have the time. Our shop has been
really tardy at wire mapping and/or documenting anything, and yesterday
I just jumped into this. I am actually suppose to be working on another
project, but this one appealed to me at the time.

I have went with the four text boxes idea, but I combine them into one
field in the table: 
( txtIPNum.value = txtIP1.value & "." txtIP2.value & "." txtIP3.value &
"." txtIP4.value)

I don't have to worry about any zeros and  I think that this will suit
my purpose...for now anyhow.

Thanks!


>>> Lambert.Heenan at aig.com 2/9/2005 9:57:20 AM >>>
I see a couple of us have spotted the Octal thing.

Someone suggested yesterday that you have four textboxes for each octet
of
the IP address. If you did that then you could have "###" as the mask
for
each box and then run a simple function like

Function StripZeros(ByVal TextIn As String) As String
   While left(TextIn, 1) = "0"
      TextIn = Mid(TextIn, 2)
   Wend
   If TextIn = "" Then TextIn = "0"
   StripZeros = TextIn
End Function


in each textbox's LostFocus event, or simply when you hit the button to
run
Ping.

Lambert

> -----Original Message-----
> From:	accessd-bounces at databaseadvisors.com 
> [SMTP:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark
> Sent:	Wednesday, February 09, 2005 8:55 AM
> To:	accessd at databaseadvisors.com 
> Subject:	RE: [AccessD] masking question
> 
> I don't want leading zeros though...this gives really odd results.
If
> you were to type, "ping 010.011.196.017", you are not going to ping
the
> intended address, but rather 8.9.196.15
> 
> I don't understand this myself...I'm trying to investigate what is
> actually happening on the network side of things, but either way, it
> means I can't store this way. Well, I could, but it would be
confusing.
> 
> >>> stuart at lexacorp.com.pg 2/8/2005 5:34:57 PM >>>
> On 8 Feb 2005 at 14:46, John Clark wrote:
> 
> >> I would guess that as the numbers are entered, the IP address is
> being
> >> thought of as 4 different pieces of data.  So, if you just used 4
> >> textboxes with sequential tab order and put periods between them,
> would that
> >> work?  
> 
> > Yeah...I've actually been contimplating this myself. It would
> probably
> > make sorting easier as well.
> > 
> So would forcing the leading zeros with "000.000.000.000"
> 
> -- 
> Stuart
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd 
> Website: http://www.databaseadvisors.com 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd 
> Website: http://www.databaseadvisors.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list