I have a module function that extracts one or more telephone numbers from
severasl records with a common ID. It is based on a query.
It loops thru a recordset using the ID and returns a string like:
2031234568
2031238654
2031236584
I have inserted a vbCrCf to break the string into separate lines.
I now want to format the telephone number in either of the following
standard formats:
(203) 123-4568 or 203 123-4568
How do I do this?
Albert D. Kallal - 26 May 2008 21:52 GMT
Use format command:
In the debug.window, I just tried:
debug.Print format("2031234568","(@@@) @@@-@@@@")
(203) 123-4568
note the output....

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com