Access 2000 input mask for IP addresses

N

nealc

Hello,
Has anyone created an input mask for a table for IP addresses? I can't
seem to get one to work.
 
A

Allen Browne

Use 4 fields, of type Number, size Byte.

If you wish, open the Properties box in table design view, and set these
Properties (must be Properties box, not lower pane of table design):
Validation Rule:
([IP1 Is Null] And [IP2 Is Null] And [IP3 Is Null] And [IP4 Is Null]) OR
([IP1 Is Not Null] And [IP2 Is Not Null] And [IP3 Is Not Null] And [IP4 Is
Not Null])

Validation Text:
Incomplete IP address. Supply or delete all 4 bytes.

Display on a form as 4 text boxes with dots in the labels between them.

Display on a report as:
=[IP1] & "." & [IP2] & "." & [IP3] & "." & [IP4]
 
N

nealc

Thanks! I will try it tonight!

Allen Browne said:
Use 4 fields, of type Number, size Byte.

If you wish, open the Properties box in table design view, and set these
Properties (must be Properties box, not lower pane of table design):
Validation Rule:
([IP1 Is Null] And [IP2 Is Null] And [IP3 Is Null] And [IP4 Is Null]) OR
([IP1 Is Not Null] And [IP2 Is Not Null] And [IP3 Is Not Null] And [IP4 Is
Not Null])

Validation Text:
Incomplete IP address. Supply or delete all 4 bytes.

Display on a form as 4 text boxes with dots in the labels between them.

Display on a report as:
=[IP1] & "." & [IP2] & "." & [IP3] & "." & [IP4]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

nealc said:
Hello,
Has anyone created an input mask for a table for IP addresses? I can't
seem to get one to work.
 
A

A Dodson

Another way to do this is with an input mask. We have a supernet and the 255
limit is not feasible for us. You would enter the following:

999.999.999.999;0;_

Good luck!
 
Top