| Lesson 4 | Working with input masks |
| Objective | Use the Input Mask Wizard to specify data input formats in Access 365 |
An input mask is a field-level pattern that guides (and optionally enforces) how data is typed into a table field or a bound control on a form. Instead of letting users enter “anything,” an input mask prompts for the exact shape of the value you want—such as digits-only phone numbers, ZIP codes, or Social Security numbers.
Input masks are primarily a data entry consistency tool. They reduce typos, improve uniformity, and make the user
experience smoother by showing placeholders (for example, (___) ___-____) while the user types.
Input masks work best when the value has a predictable structure:
An important detail: an input mask does not guarantee that the value is “real”—it only constrains the shape
of the data. For example, a mask can require 999-99-9999, but it cannot tell whether that number is legitimate.
For business correctness, pair input masks with:
You can type mask expressions manually, but it’s easy to make mistakes. The Input Mask Wizard is the safer and faster approach because it:
You launch the wizard from Table Design view (or from the Property Sheet for a bound form control) by clicking the Builder button next to the Input Mask property.
The slideshow below demonstrates the typical workflow: create a field, open the wizard, select a mask, and then test entry. The example uses an SSN-style mask to illustrate mechanics.
SSN) to the table in Design view.
In Access, an input mask is commonly described as having three parts separated by semicolons:
(, ), -, .).
0 = store literal characters (formatting becomes part of the stored value)1 = do not store literals (formatting is only displayed)Example structure:
(999) 000-0000;0;_
In that example, the parentheses and hyphen are literals, the “store literals” choice is 0 (store them), and
the placeholder is _.
You don’t need to memorize every symbol to use masks effectively, but a few show up constantly:
0 — required digit (0–9)9 — optional digit (0–9)L — required letter (A–Z)? — optional letterA — required letter or digita — optional letter or digit& — required any characterC — optional any characterThis is why the wizard is valuable: it supplies good defaults and prevents subtle formatting mistakes.
Input masks can be applied in multiple places, but you should decide based on your design goal:
In the next lesson, you will learn how to set up fields and controls that use Combo Boxes and List Boxes to standardize data input even further.