Conditional Input Mask for telephone field with US/UK numbers

G

Guest

Since I've got a mix of US and UK numbers I can't apply a mask to the data in
the table; I figured I could apply the mask through the form, but is there a
way to now test if the phone number value is UK to either not apply the mask,
or apply a different mask?
TIA for any advice
 
G

Guest

Input masks are more pain than gain; however, if you must use them, use them
at the form control level rather than at the table field level. The only way
you will be able to do this is to be able to tell before you enter the phone
field whether the contact is a US or UK contact, and set the input mask
programmatically.

My approach would be to have no input mask, but to evaluate the entry in the
control's Before Update event. I would test for correct formatting for both,
and if neither fit, raise an error and Cancel. If either worked, redisplay
it with the the format.
 

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