Using Input Masks to Restrict Data

When you use masks in tables or forms, people entering information can see at a glance the format in which they should make entries and how long they should be. You can use the InputMask property to control how data is entered in text, number, date/time, and currency fields. This property has three sections, separated by semicolons, like the mask for a telephone number, shown here:

!\(000") "000\-0000;1;#

The first section contains characters that are used as placeholders for the information to be typed, as well as characters such as parentheses and hyphens. Together, all these characters control the appearance of the entry. The following list explains the purpose of the most common input mask characters:

Character ...

Get Microsoft® Office System Step by Step -- 2003 Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.