I have a query based on a table with a telephone number field that stores
the number thusly: 9993333333. I'd like the query to display the phone
number as such: (999) 333-3333. How can I do this?
Thanks for your help.
Kevin D.
TheTelephone: Format([TheTelephoneNumberField],"(@@@) @@@-@@@@")
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
Assuming the field is a Text field, set the format property
of whatever is used to display (a form/report text box) the
phone number to:
(@@@) @@@-@@@@
--
Marsh
MVP [MS Access]
Business Phone: Format([Business Phone],"(###) ###-####")
Although you probably want
Business Phone: Format([Business Phone],"(@@@) @@@-@@@@")
And that can still cause errors, so you might need
Business Phone: Format([YOUR TABLE NAME].[Business Phone],"(@@@) @@@-@@@@")
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
samiauthor wrote:
> Hello Jerry, I tried to do what you suggested here for the other post, but
> still have a problem with it. This is what I have:
> Business Phone: ([Business Phone],"(###) ###-####")
>
> Can you please tell me what I'm missing?
> Thank you, Sharon
> vcis...@comcast.net
"samiauthor" wrote:
> Hello Jerry, I tried to do what you suggested here for the other post, but
> still have a problem with it. This is what I have:
> Business Phone: ([Business Phone],"(###) ###-####")
>
> Can you please tell me what I'm missing?
> Thank you, Sharon
> vcis...@comcast.net
>
> "Jerry Whittle" wrote:
>