Format Input Mask

G

Guest

Is it possible to create an input mask for phone numbers for where it will be
either this format:

x (xxx) xxx-xxxx

OR this format:

xxxxx (xxx) xxx-xxxx
 
E

Ed Robichaud

Having conditional formatting and/or variable input masks at the table level
is not possible. However, when using a data entry form (and data entry
should almost never be done directly into a table), you can set either or
both format and input mask based on some other user criteria. For example,
if the related country address was US or Canada, the phone mask would be
"(xxx) xxx-xxxx", but if other then the mask would change to "xxxx (xxx)
xxx-xxxx". You would need to code this into the form's AfterUpdate event of
the country/zip control.
-Ed
 
J

John W. Vinson

Is it possible to create an input mask for phone numbers for where it will be
either this format:

x (xxx) xxx-xxxx

OR this format:

xxxxx (xxx) xxx-xxxx

No.

A field can have only one input mask. It's not selectable.

If you need to constrain the layout of the phone field, you'll need to do so
in VBA code on the form.

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