Correcting phone numbers

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

John

Hi

How can I strip all spaces in between digits from a phone number, strip the
first zero and then append +44 at the start?

Thanks

Regards
 
phone = "+44" & iif(left(replace(trim(phone), " ", ""), 1) = "0",
right(phone, len(phone) - 1), replace(trim(phone), " ", ""))

hope it helps
 
To strip the space:

Replace([Phone Number]," ","")

I need more information for the rest. Is the first zero, the first
character? Is there only 1 zero? Is it in every record?

To append +44, simply run an update query:

UPDATE tblMyTable SET [Phone Number] = "+44" & [Phone Number];
 
Back
Top