Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add mask to combos...

Status
Not open for further replies.

adsfx

Programmer
Jun 4, 2003
237
GB
have a combo but want to add a mask to.
i have tcp addresses stored without separators.
when tcp is looked up instead of looking like 010050170009
i would like them to look like 010.050.170.009
cheers MG
 
In Access Help look under 'InputMask Property' and then read the custom mask section - I think that will solve you problem.
 
I don't think you want an INPUT mask, which, oddly enough, controls INPUT of data - you want a FORMAT. If your data already exists like 255255255 and you want it to LOOK like 255.255.255, you need to apply a DISPLAY format.

Unfortunately, unlike Socials and Phone Numbers and Dates, IP addresses have not yet entered into the vernacular insofar as display formats go. So you'll have to build your own. Problem is, how do you parse it? If you have an IP stored like this: 251512 , is it 251.5.12 or 25.15.12 or 251.51.2 or what? You probably want to rethink the ENTRY of this data, and capture each 'third' of the IP independently. This is necessary UNLESS you FORCE entry of zero-placeholders, 025064001 to be resolved to 25.64.1

See the problem?

Jim


If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
cheers Jim,
the leading 0's are forced so all data has 12 digits,
should I have set the data to capture the dots aswell?
thought this would waste space
anyways is there a Format function for combos?
cheers MG
 
If all your data has all 12 digits, you can easily format a more 'accurate' looking IP address by just chunking the guys together in your query ( you DO use a query to populate the Combo, right??)

Left(IP, 3) & "." & Mid(IP, 4,3) & "." & Mid(IP, 7,3) & "." & right(IP, 3)

this will turn 255255255100 into 255.255.255.100

which sounds like what you need.

As far as saving space, when a 120GB HD can be found for around a hundred bucks, my philosophy is, if it takes more than half an hour for a PERSON to do something to save space, it's cheaper to buy hardware.

How long would it take your three extra periods to fill up 120GB?...

:)

Jim

If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
your right of corse, gonna change it so input mask is stored with IP
ps i DOO use a query
thanx MG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top