Input Mask

S

Steve Ainsworth

Any ideas as to an input mask for british postcodes and telehone numbers.

Cheers
 
J

John Vinson

Any ideas as to an input mask for british postcodes and telehone numbers.

Input masks simply aren't flexible enough.

British postcodes are not consistant in size; I haven't dealt with
them enough to quote real examples, but outside London they contain
six characters, and in London seven. Masks are quite limited and do
not allow for this difference.

International telephone numbers suffer the same problem, only more so.
 
J

John Nurick

As John V says, input masks aren't flexible enough for UK postcodes (and
even if our postcodes were simpler, an input mask would still prevent
you entering an international postcode).

If you want to ensure that the user has entered a valid postcode, the
only way is in effect to look it up in the Royal Mail's PAF (postal
address file); software for this is available but last time I looked the
RM licence fee made it unpleasantly expensive for casual use.

If you just want to check that the user has entered something that looks
like a valid postcode or phone number, you can use the rgxValidate()
function at http://www.mvps.org/access/modules/mdl0063.htm in the
BeforeUpdate event of the control that's displaying the field.
 

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