Input Mask

P

PeterA

My users want a telephone number input mask to be able to
use two formats. The primary one is \(999") "000\-0000
which is easy enough to do.

However, they also want to cut and past phone numbers
with dashes into this field as well 123-456-7890. The
field is being stored without any ( or -.

Is there a way around this problem so that everyone is
happy?

If I could trap a condition that if they entered 123-456-
7890 into an input mask of (123) 456-7890, then I could
dynamically change the input mask. I can't find any such
event. If you enter 123-456-7890 into the (123) 456-7890
input mask you get a beep and it displays (111) -

Thanks in advance for any help!
 
M

Mike Painter

PeterA said:
My users want a telephone number input mask to be able to
use two formats. The primary one is \(999") "000\-0000
which is easy enough to do.

However, they also want to cut and past phone numbers
with dashes into this field as well 123-456-7890. The
field is being stored without any ( or -.

Is there a way around this problem so that everyone is
happy?

If I could trap a condition that if they entered 123-456-
7890 into an input mask of (123) 456-7890, then I could
dynamically change the input mask. I can't find any such
event. If you enter 123-456-7890 into the (123) 456-7890
input mask you get a beep and it displays (111) -

Thanks in advance for any help!

I hate input masks because they force you to click at the exact start of a
field (or click on the label.)

If you format the output as @@@ @@@-@@@@
then 5551231234 shows as 555 123-1234 and
5551234 shows as 555-1235.

In the before update event you can use
Replace(YourNumber,"-","") to get rid of the stuff you don't want.
 

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