Proper tel format

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

How can I convert a tel number like 020 5555 4171 into +44 (0) 20 5555 4171?

Many Thanks

Regards
 
John said:
Hi

How can I convert a tel number like 020 5555 4171 into +44 (0) 20 5555
4171?

As there is no universal, international format for telephone numbers, other
than the +nn country code, that's a little difficult to answer. You
certainly cannot just assume that the country code is +44, unless that is
the case for all the numbers you deal with.

There's some information that may or may not be useful to you at
http://www.xml.gov.hk/en/approved/telephone_number_v1_0.htm -- note that it
is perhaps just specific to Hong Kong. Another is
http://www.fws.gov/stand/standards/de_intertelephone.html but it, too, is
limited in scope.

Larry Linson
Microsoft Access MVP
 
Hi John

Following on from Larry's post - if you are sur you want this, I would not
store it in a table - use it on a form to help users. You can use this

SELECT "+44 " & "(0) " & RTrim([TableName]![PhoneNumber]) AS TelNo
FROM TableName;

Or just put this into a calculated field
TelNo: "+44 " & "(0) " & RTrim([TableName]![PhoneNumber])

But, as Larry mentioned it will not work ??. In the UK most people just
give the last section of the number (without the code) so the above will give
you the wrong phone number. Also bear in mind that this can not be used for
autodialers as there are spaces in the resulted calculated field.

But I hope this points you in the right direction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top