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!

Formatting a phone number 1

Status
Not open for further replies.

itechC

Programmer
Feb 13, 2003
71
CA
Hi all,

I need to format a phone number that i'm displaying on my flex grid with the standard ###-###-#### format. I know that there is a control in vb that formats for you but i can't find it. Does anyone know where i can get it or an easier way of doing this. Thanks
 
Hi

I believe what you are looking for is the DataFormat object. Define the format you want in the DataFormat object and then link the column in the flexgrid to the object.

Cassandra
 
Or simply use the format function:
[tt]
strNum = "1234567890"
strTidy = Format(strNum,"###-###-####")
Debug.Print strTidy
[/tt]

will produce:
123-456-7890

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
In terms of the control.. The Microsoft Masked Edit one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top