Data Manipulation  «Prev  Next»

Lesson 5 Use an input mask to limit data
Objective Use the Input Mask Wizard to limit data in MS Access 365

Use the Input Mask Wizard to Limit Data Entry in Access 365

In Microsoft Access, an input mask is a field property that guides users to enter data in a required format. It does this by displaying a template (for example, (___) ___-____) and enforcing where digits, letters, and optional characters may appear as the user types.

Input masks are especially useful for values that must follow a consistent pattern—such as phone numbers, employee IDs, postal codes, or other standardized codes. They are primarily a format control, not a full business-rule enforcement system. To truly “limit” data logically (for example, restricting a date to today or earlier), you typically pair an input mask with validation rules, required fields, and appropriate data types.

Input mask vs. validation rule: what each one really does

Access provides two major layers of control that are often confused:

In real databases, you often use both: the input mask improves user entry consistency, and validation rules enforce business correctness when records are saved.

Using the Input Mask Wizard

The fastest way to apply a standard mask is to use the Input Mask Wizard. The wizard offers common templates and lets you test how the value will look during data entry.

  1. Open the table in Design View.
    Input masks are applied at the table-field level, so you must work in Table Design view (not Datasheet view).
  2. Select the field you want to control.
    Input masks are most commonly used with Short Text fields (codes, IDs) and can also be used with some Date/Time scenarios depending on your UI requirements.
  3. In the Field Properties pane (bottom area), open the General tab and click the Input Mask property box.
  4. Click the Build button (...) to launch the wizard.
    This button appears on the right side of the Input Mask property once the box is active.
  5. Choose a predefined pattern (for example, Social Security Number) and use the Try It box to test entry.
    You will see placeholders (often underscores) representing required characters, and any literal formatting characters (such as hyphens) will appear in the template.
  6. Click Next to review or customize the mask settings.
    You can typically change the placeholder character and review the mask symbols (for example, 0 meaning “required digit”).
  7. Decide whether Access should store the literal formatting characters (such as hyphens) or store only what the user types.
    This choice impacts searching, exporting, and integration. Storing only the digits can be helpful when you want standardized values without punctuation, but storing formatting may be useful for readability in some workflows.
  8. Click Finish to apply the input mask to the field.
  9. Save the table design changes, then switch back to Datasheet View to test the user experience.
    You should now see the template guiding entry, and Access will prevent characters that do not fit the mask.

Understanding the three-part input mask format

When the wizard completes, Access writes the mask in a three-part structure separated by semicolons:

mask-pattern ; store-literals ; placeholder

This structure explains why you may see an input mask value that looks “cryptic” at first glance—the wizard is simply writing the mask configuration into a compact format.

Creating an input mask from scratch

If none of the wizard templates match your data, you can create (or fine-tune) a custom input mask. In practice, it is often faster to start with the closest wizard option and then edit it.

When you create a custom mask, focus first on the data pattern (part 1). After that, decide whether formatting characters should be stored (part 2), and finally choose the placeholder character (part 3).

Common input mask characters

The following table summarizes frequently used input mask symbols. These characters define what Access allows at each position in the pattern.

Input mask character Defines this allowed or required input
0 Required digit (0–9). The user must enter a digit in this position.
9 Optional digit or space. The user may leave this position blank.
# Optional digit, space, plus (+), or minus (-). Useful for signed numeric input patterns.
L Required letter (A–Z). The user must enter a letter.
? Optional letter (A–Z). The user may leave it blank.
A Required alphanumeric character (letter or digit).
a Optional alphanumeric character (letter or digit).
C Optional any character or space (least restrictive).
< Forces all following characters to lowercase.
> Forces all following characters to uppercase.
! Fills the mask from right to left. Useful when leading characters are optional.
\ Treats the next character as a literal (for example, \S displays S).
. or , Displays the decimal placeholder or thousands separator, depending on locale settings.
: ; - / Displays a literal separator character (commonly used for dates and times).

Modern notes and best practices for Access 365

Next, you will build on these concepts by selecting fields efficiently in Datasheet and Design views and applying additional field-level controls.


Learn how to select fields in Datasheet and Design views.
SEMrush Software Target 5SEMrush Software Banner 5