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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obtain field value without its input mask

Status
Not open for further replies.

rss0213

Programmer
Jul 12, 2007
58
US
Hi. My users created a field in a table with an input mask. How do I obtain this value without its input mask? The field is a fax number, and they have it masked as "(###) ###-####". So when I code "varFaxNum=Customers.FaxNumber", I get "(555) 555-5555". But I just want the numbers - not the spaces and special characters. Do I have to write a routine to do this (to check each character for "IsNumeric"), or is there like an "unmask" function or something?

Thanks!
Scott
 
If code is returning the formatted number, then not only did the user put a mask on input, but also told it to store the data as masked.

You will have to parse it with mid and right function.

ChaZ



There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
Thanks for the feedback. That's what I did.

Thanks!
Scott
 
The really scary thing here is that your end users have access to modify tables and presumably anything else they want to! Your glitch here is very small compared to what could happen if this practice continues!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top