A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Unformat Phone Number Field



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2008, 11:11 PM posted to microsoft.public.access.queries
Brad[_6_]
external usenet poster
 
Posts: 8
Default Unformat Phone Number Field

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


  #2  
Old July 8th, 2008, 11:29 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Unformat Phone Number Field

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
'================================================= ===


Brad wrote:
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


  #3  
Old July 9th, 2008, 12:38 AM posted to microsoft.public.access.queries
Brad[_6_]
external usenet poster
 
Posts: 8
Default Unformat Phone Number Field

John,

That worked perfect. Thank you so much for the quick help.

Brad

"John Spencer" wrote in message
...
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
'================================================= ===


Brad wrote:
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.