Help with setting up phone number format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to fortmat a phone number field and need the table to show phone
numbers like (123)456-7890. I am doing something wrong, please help
 
Karen said:
I am trying to fortmat a phone number field and need the table to show
phone numbers like (123)456-7890. I am doing something wrong, please
help

Well, . . What have you done so far? :-)
 
xRoachx gave very good advice for an input mask. That will work for new
records.

If it's existing records that are wrong, you need to actually change the
data to see the formatting at the table level. If the data is consistent,
like 1234567890, you could format it to look right in queries, forms, and
reports.

However if you are ever doing business with foreign countries, I suggest
forgetting about the format of a phone number. Aside from parts North
America, most other countries phone numbers do not follow any set pattern.
For example my old phone number in England looked like 0869 233123. You will
have troubles trying to get an input mask to work with all the different
formats.
 
Use an Input Mask -- There is a built-in IM for the phone number. As a note,
it shouldn't matter how the information is viewed in the table but in the
form, query, or report.
 
Karen:

Using a text field (which allows for leading zeros to be stored as part of
the data, unlike a number data type) set the Format property to:

(@@@)@@@-@@@@

If you wish you can also give it an input mask of:

\(000\)000\-0000;;_

This will show the parentheses and dash in the mask, but not save them as
part of the data.

Ken Sheridan
Stafford, England
 
Back
Top