Replace Function

hycho

Registered User.
Local time
Yesterday, 19:53
Joined
Sep 7, 2011
Messages
59
All,

I would like to convert the phone number:

(123) 456-7890 to 1234567890

I tried using the replace function... But I was wondering if there is a way replace the symbols and spaces using just one function... or if there is a better a way of doing this? I have a couple of thousands of phone numbers to convert, and have been exporting the file to Excel, use the find-replace function, and then importing back to Access.

I tried using function below, but it didn't work (thought it was worth the try):

Replace([phone],"-" Or "(" or ")","")

Thanks.
 
Do all your phone numbers have that format? If so, you can use this:

PhoneNumber: Mid([PhoneNumberFieldName],2,3) & Mid([PhoneNumberFieldName],7,3) & Mid([PhoneNumberFieldName],11)

Replace "PhoneNumberFieldName" with the name of the field containing your phone number data.
 

Users who are viewing this thread

Back
Top Bottom