Database Reference
In-Depth Information
You can use the Input Mask property to control how data is entered in Short Text, Number,
Date/Time, and Currency fields. For Short Text and Date/Time fields, an Input Mask wiz-
ard is available to help you apply several common, predefined masks. For Number and
Currency fields, you have to know how to create a mask from scratch.
The Input Mask property has three sections, separated by semicolons. For example, the
following mask is for a phone number:
!\(000”) “000\-0000;1;#
The first section contains characters that are used as placeholders for the information to
be entered, in addition to characters such as parentheses and hyphens. Together, all these
characters control the appearance of the entry. The following table explains the purpose of
the most common input mask characters.
Character
Description
0
Required digit (0 through 9).
9
Optional digit or space.
#
Optional digit or space; blank positions are converted to spaces; plus and
minus signs are allowed.
L
Required letter (A through Z).
?
Optional letter (A through Z).
A
Required letter or digit.
a
Optional letter or digit.
&
Required character (any kind) or a space.
C
Optional character (any kind) or a space.
<
All characters that follow are converted to lowercase.
>
All characters that follow are converted to uppercase.
!
Characters entered into the mask fill it from left to right. You can include
the exclamation point anywhere in the input mask.
\
Character that follows is displayed as a literal character.
“any text”
Characters enclosed in double quotation marks are treated as literal
characters.
Any characters not included in this list are displayed the way you enter them and are known
as literal characters . If you want to use one of the special characters in this list as a literal
character, precede it with the \ (backslash) character.
The second and third sections of the input mask are optional. Including a 1 in the second
section (or leaving it blank) tells Access to store only the characters entered; including a
Search WWH ::




Custom Search