Forms Input Mask

M

MikeF

Have an phone AreaCode field, and would like to enclose it in parentheses
for visual ease-of-use.

It would be easy if all area codes were in North America, ie \(000\).

But that is not the case.

Need an input mask that will handle a 1-character area code, ie Paris France
(1) ; or 4 characters, ie Brighton, England (1273); or Chicago, ie (312);
or perhaps 5 or 6 characters, ie Eastern Europe/Japan/etc .... with no spaces
between the parentheses and the area code characters --- no matter how many
or few there are.
.... Other than there *has* to be 1 character, otherwise the field should be
null.

Can't seem to get the "(" in everywhere without spaces.

Any assistance will be greatly appreciated.

Regards,
- Mike
 
J

John W. Vinson

Have an phone AreaCode field, and would like to enclose it in parentheses
for visual ease-of-use.

It would be easy if all area codes were in North America, ie \(000\).

But that is not the case.

Need an input mask that will handle a 1-character area code, ie Paris France
(1) ; or 4 characters, ie Brighton, England (1273); or Chicago, ie (312);
or perhaps 5 or 6 characters, ie Eastern Europe/Japan/etc .... with no spaces
between the parentheses and the area code characters --- no matter how many
or few there are.
... Other than there *has* to be 1 character, otherwise the field should be
null.

Can't seem to get the "(" in everywhere without spaces.

Any assistance will be greatly appreciated.

Regards,
- Mike

Input masks simply do not have the flexibility to do this. You'll probably
need to use an unbound control with some pretty complicated VBA code to parse
it.

Some developers just give up and leave international phone fields unformatted
and without input masks, and trust the users to be well trained enough to
enter the numbers correctly; others will have code to change the mask property
dynamically based on the selection of a country code elsewhere on the form.
There's no good *and* easy solution to my knowledge.
 
J

John W. Vinson

Sometimes you simply have to (GASP!) rely on the intelligence of the end
users!

The problem with designing an idiot-proof application is that the idiots are
so clever at finding ways of breaking it.
 

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