Conditional Input Mask for telephone field with US/UK numbers

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top