Formatting issue with imported telephone number!

J

JHB

Hi:

I have an unusual situation and need some advice. I am using Access
2000 with windows XP.

I have imported client records from a spreadsheet. On that
spreadsheets, phone numbers have been formatted to the standard phone
format and this appears to import into a table with the entry mask set
to telephone format. The format holds when the field is used alone (ie
is in a report as a unique field) BUT when I concatenate as in: [Home
Address]&" Phone: "&[Home Phone], it either looses all formatting and
shows as a number, or appears in a zip code format. Can anyone suggest
a way out of this and/or offer any reason his might be happening?.
Data input directly into the phone number field goes in as a phone
number and stays that way through all processing!

Any Help appreciated

John Baker
 
G

Gloops

Hello,

You say that when using the phone number alone, it has the good format ...
So, a possible syntax is the following one :

strPhone = [Home Phone]

strFullAddress = [Home Address] & " - Phone : " & strPhone

If this is not OK, you can put the [Home Phone] field in a textbox
control named txtPhone, with a phone format input mask, and extract the
phone number that way :

strPhone = Format(txtPhone.Value, txtPhone.InputMask)
 
J

JHB

Hello,

You say that when using the phone number alone, it has the good format ....
So, a possible syntax is the following one :

strPhone = [Home Phone]

strFullAddress = [Home Address] & " - Phone : " & strPhone

If this is not OK, you can put the [Home Phone] field in a textbox
control named txtPhone, with a phone format input mask, and extract the
phone number that way :

strPhone = Format(txtPhone.Value, txtPhone.InputMask)

Thank you..
 

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

Top