PC Review


Reply
Thread Tools Rate Thread

Change data format in a field?

 
 
retired fire
Guest
Posts: n/a
 
      7th Nov 2008
I currently have a phone number field which uses a format of 404-405-7777
and I want to change it to (404) 405-7777 format.

Can this be done and is there a way to globally change the format on
existing data in the phone field (large data base)???

Thanks
 
Reply With Quote
 
 
 
 
Ken Snell \(MVP\)
Guest
Posts: n/a
 
      7th Nov 2008
Are you storing the phone numbers right now as the xxx-xxx-xxxx value? If
yes, then you'd need to run an update query to change the data to the "new"
format.

If you're just storing the phone number as xxxxxxxxxx value, then you can
use the Format property to change how the number is displayed on forms and
reports.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"retired fire" <(E-Mail Removed)> wrote in message
newsDA140F8-45BA-484F-A64C-(E-Mail Removed)...
>I currently have a phone number field which uses a format of 404-405-7777
> and I want to change it to (404) 405-7777 format.
>
> Can this be done and is there a way to globally change the format on
> existing data in the phone field (large data base)???
>
> Thanks



 
Reply With Quote
 
fredg
Guest
Posts: n/a
 
      7th Nov 2008
On Fri, 7 Nov 2008 14:09:01 -0800, retired fire wrote:

> I currently have a phone number field which uses a format of 404-405-7777
> and I want to change it to (404) 405-7777 format.
>
> Can this be done and is there a way to globally change the format on
> existing data in the phone field (large data base)???
>
> Thanks


Do ALL of the phone numbers include the area code and both dashes?
If the numbers are actually stored that way, as opposed to just how
they are formatted, then an Update query can be used to permanently
change the values:

Update YourTable set YourTable.Phone = "(" & Left([Phone],3) & ") " &
Right([Phone],8)

Then remember to change how new numbers are entered.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
Tony Toews [MVP]
Guest
Posts: n/a
 
      8th Nov 2008
retired fire <(E-Mail Removed)> wrote:

>I currently have a phone number field which uses a format of 404-405-7777
>and I want to change it to (404) 405-7777 format.


Now you will never have international phone numbers right?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Reply With Quote
 
retired fire
Guest
Posts: n/a
 
      8th Nov 2008
No international numbers...

"Tony Toews [MVP]" wrote:

> retired fire <(E-Mail Removed)> wrote:
>
> >I currently have a phone number field which uses a format of 404-405-7777
> >and I want to change it to (404) 405-7777 format.

>
> Now you will never have international phone numbers right?
>
> Tony
> --
> Tony Toews, Microsoft Access MVP
> Please respond only in the newsgroups so that others can
> read the entire thread of messages.
> Microsoft Access Links, Hints, Tips & Accounting Systems at
> http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
>

 
Reply With Quote
 
John Spencer
Guest
Posts: n/a
 
      8th Nov 2008
One method would be to use an update query where the update to value
would be

Format(Replace([PhoneNumber],"-",""),"\(@@@\) @@@\-@@@@")

And criteria of
Like "???[-]???[-]????"

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


retired fire wrote:
> I currently have a phone number field which uses a format of 404-405-7777
> and I want to change it to (404) 405-7777 format.
>
> Can this be done and is there a way to globally change the format on
> existing data in the phone field (large data base)???
>
> Thanks

 
Reply With Quote
 
ANNA MARIA
Guest
Posts: n/a
 
      10th Nov 2008
ok dear
Ο "Ken Snell (MVP)" <(E-Mail Removed)> έγραψε στο μήνυμα
news:(E-Mail Removed)...
> Are you storing the phone numbers right now as the xxx-xxx-xxxx value? If
> yes, then you'd need to run an update query to change the data to the
> "new" format.
>
> If you're just storing the phone number as xxxxxxxxxx value, then you can
> use the Format property to change how the number is displayed on forms and
> reports.
> --
>
> Ken Snell
> <MS ACCESS MVP>
> http://www.accessmvp.com/KDSnell/
>
>
> "retired fire" <(E-Mail Removed)> wrote in message
> newsDA140F8-45BA-484F-A64C-(E-Mail Removed)...
>>I currently have a phone number field which uses a format of 404-405-7777
>> and I want to change it to (404) 405-7777 format.
>>
>> Can this be done and is there a way to globally change the format on
>> existing data in the phone field (large data base)???
>>
>> Thanks

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
You can't change the data type or field size of this field error. =?Utf-8?B?TWVsYW5pZQ==?= Microsoft Access 2 3rd Aug 2007 03:08 PM
format of Form field that allows data to be copied without format =?Utf-8?B?S2VuIEdlaGxl?= Microsoft Access Forms 6 27th Oct 2006 05:59 PM
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Microsoft Excel Worksheet Functions 1 11th Mar 2006 04:44 AM
Formatting field does not format all field data Rolf Barbakken Microsoft Word Document Management 4 24th Jul 2005 02:07 PM
Change the resulting data format in a field =?Utf-8?B?QWRyaWFu?= Microsoft Access Queries 3 13th Dec 2004 12:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 PM.