Input Mask

  • Thread starter Thread starter Steve Ainsworth
  • Start date Start date
S

Steve Ainsworth

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

Cheers
 
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.
 
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.
 
Back
Top