Input Mask

R

retired fire

I have a large table where the phone number is entered as 222-222-2222 and I
would like to use the input mask (222) 222-2222

I can set the input mask which works for new entries, but how can I convert
the current phone numbers to the new input mask?

Thanks for any suggestions..
 
J

John W. Vinson

I have a large table where the phone number is entered as 222-222-2222 and I
would like to use the input mask (222) 222-2222

I can set the input mask which works for new entries, but how can I convert
the current phone numbers to the new input mask?

What is the actual input mask? It can be set to either store the punctuation,
or to generate it on demand. If the Phone field is actually *stored* as

2222222222

then you can change the mask, and the new mask will apply to all entries.

If, on the other hand, you are storing the punctuation in the field, you can
run an Update query to remove the hyphen and insert the parentheses. *Test
this carefully*, on a backup of your database; update queries aren't
reversible - but you can update the field to

"(" & Left([Phone], 3) & ")" & Mid([Phone], 5)


John W. Vinson [MVP]
 

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