You are on page 1of 4

Characters that define input masks

The following table lists the placeholder and literal characters for an input mask and
explains how it controls data entry:

Character Explanation
0 User must enter a digit (0 to 9).
9 User can enter a digit (0 to 9).
# User can enter a digit, space, plus or minus sign. If skipped, Access enters a blank space.
L User must enter a letter.
? User can enter a letter.
A User must enter a letter or a digit.
a User can enter a letter or a digit.
& User must enter either a character or a space.
C User can enter characters or spaces.
.,:;-/ Decimal and thousands placeholders, date and time separators. The character you select depends on
your Microsoft Windows regional settings.
> Coverts all characters that follow to uppercase.
< Converts all characters that follow to lowercase.
! Causes the input mask to fill from left to right instead of from right to left.
\ Characters immediately following will be displayed literally.
"" Characters enclosed in double quotation marks will be displayed literally.
Examples of input masks
This input mask Provides this type Notes
of value
(000) 000-0000 (206) 555-0199 In this case, you must enter an area code because that section of the
mask (000, enclosed in parentheses) uses the 0 placeholder.
(999) 000-0000! (206) 555-0199 In this case, the area code section uses the 9 placeholder, so area
( ) 555-0199 codes are optional. Also, the exclamation point (!) causes the mask
to fill in from left to right.
(000) AAA-AAAA (206) 555-TELE Allows you to substitute the last four digits of a U.S. style phone
number with letters. Note the use of the 0 placeholder in the area
code section, which makes the area code mandatory.
#999 -20 Any positive or negative number, no more than four characters, and
2000 with no thousands separator or decimal places.
>L????L?000L0 GREENGR339M3 A combination of mandatory (L) and optional (?) letters and
MAY R 452B7 mandatory numbers (0). The greater-than sign forces users to enter
all letters in uppercase. To use an input mask of this type, you must
set the data type for the table field to Text or Memo.
00000-9999 98115- A mandatory postal code and an optional plus-four section.
98115-3007
>L<?????????????? Maria A first or last name with the first letter automatically capitalized.
Pierre
ISBN 0- ISBN 1-55615-507- A book number with the literal text, mandatory first and last digits,
&&&&&&&&&-0 7 and any combination of letters and characters between those digits.
>LL00000-0000 DB51392-0493 A combination of mandatory letters and characters, all uppercase.
Use this type of input mask, for example, to help users enter part
numbers or other forms of inventory correctly.
Add an input mask to a table field
using the Input Mask Wizard
1. In the Navigation Pane, right-click the table and click Design View on the
shortcut menu.
2. Click the field where you want to add the input mask.
3. Under Field Properties, on the General tab, click the Input Mask property
box.
4. Click the Build button to start the Input Mask Wizard.
5. In the Input Mask list, select the type of mask that you want to add.
6. Click Try it and enter data to test how the mask displays.
7. To keep the input mask without any changes, click Next.
8. Select an option for how you want the data to be stored.
9. Click Finish and save your changes.

Using input masks for email


addresses
Property Setting
Validation Rule Is Null Or ((Like "*?@?*.?*") And (Not Like "*[ ,;]*"))
Validation Please enter the email address with an '@' sign and the full domain name (for example,
Text (optional) 'frank@contoso.com').

You might also like