Unformat Phone Number Field

B

Brad

All,

I have a database table that has a field Fax_Numbers that have fax numbers
saved in the format: (333) 444-5555.

I wish to use these numbers in a query with the numbers left justified and
with numerals only: 3334445555.

I can't seem to "unformat" using the Format function in a query. Your help
would be greatly appreciated.

Thank you in advance.

Brad
 
J

John Spencer

You could use the following expression in a query.
Assumption: Access 2000 SP2 or later

Field: NumbersOnly: Replace(Replace(Replace(Replace(Fax_Numbers,"
",""),"-",""),"(",""),")","")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top