Format field as a phone number in report

TyeReece

Board Regular
Joined
Aug 3, 2007
Messages
136
I have a common access report. One of my text boxes is
="If you have questions about this report, please contact: " & [CompRptCntctFirstNm] & " " & [CompRptCntctLastNm] & " at " & [CompRptCntctPhone]
When I run it I get something like the following:
If you have questions about this report, please contact: John Smith at 1234567890

I want the [CompRptCntctPhone] to come out as formatted as a phone number. The field in the table is formatted as short text. I don't get the option to change the format in the properties box (it is blank). I guess because it is included in a larger text box. Is there an easy way to make this come out as (123) 456-7890?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try:
Code:
[COLOR=#333333]="If you have questions about this report, please contact: " & [CompRptCntctFirstNm] & " " & [CompRptCntctLastNm] & " at " & [/COLOR][COLOR=#ff0000]FORMAT([CompRptCntctPhone],"(@@@) @@@-@@@@")[/COLOR][COLOR=#333333][/COLOR]
 
Upvote 0
I get an invalid syntax error (operand without an operator). But I will play with this and see. Thanks!
 
Upvote 0
Sure. it was ="If you have questions about this report, please contact: " & [CompRptCntctFirstNm] & " " & [CompRptCntctLastNm] & " at " & Format([CompRptCntctPhone],"(@@@)-@@@-@@@@")
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top