Access And Phone Numbers

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

Guest

I have an Access table that have phone numbers stored in it.
I am using an input mask that looks like this 999 999 9999 when entering the
data, but I am sure that Access is storing the data like this 9999999999.

My problem is when displaying the number in FrontPage it is displayed like
this
9999999999 how can I make the number show like this 999 999 9999 in FrontPage.


Thanks Bill
 
When you create the input mask, there is an option for saving data with the
formating or without the formating. Chose the one that saves the formatting.
Access will then save the spaces, dashes, parenthesis, and other formating
stuff in the table and therefore on your FP Pages.
 
Kathleen, thanks for your help I gave it a try but no luck. this is what I
have.

Thanks for your help

SELECT People.tFirstName, People.tLastName, Company.tCompanyName,
Company.tAddress1, Company.tAddress2, Company.tCity, Company.tState,
Company.tZipCode, People.tEmailAddress, Company.Active, Company.tType,
Company.twebsite, People.tMobilePhone, Company.tPhone1, Company.tPhone,
People.Phone,
FORMAT(tPhone,'(###) ###-####') AS NewPhone
FROM People INNER JOIN Company ON People.iCompanyFk=Company.iCompanyPk
WHERE (((Company.Active)=True) AND ((Company.tType)="Allied"))
ORDER BY Company.tCompanyName;
 
FORMAT(tPhone,'(###) ###-####')
should be
FORMAT(Company.tPhone,'(###) ###-####')

This will only format the Company.tPhone field. You will have to repeat
this for all the other telephone numbers if you want them formatted as
well. You can remove Company.tPhone from the SQL since you will be
displaying the NewPhone field instead.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp
 
Back
Top