Share this Page URL

Chapter 3. Managing the Consistency, For... > Using the Input Mask Wizard - Pg. 91

Managing the Consistency, Format, and Integrity of Your Data 91 Input Mask Special Characters You create an input mask by entering the special characters required for the mask in the Input Mask property or by using the Input Mask wizard. A simple input mask such as AA would control the number of characters in a field for U.S. state names. You or someone using your database could enter only two characters (ND rather than N. Dakota or N. Dak.). Another input mask you can enter easily on your own is one for a product code that combines alphanumeric characters. The mask L0000 would allow for a single character and four numbers. A valid value would include P0308. Table 3-2 lists the special characters you can use to create an input mask and describes what they symbolize. To define a literal character (not a placeholder but a specific character, including spaces and symbols) or to use one of the special characters as a literal character (for example, if you need to use L as L and not as a placeholder), precede that character with a backslash (\). Table 3-2. Input Mask Characters Character 0 9 # L ? A a & C Description Digit (0 through 9; entry required; plus signs [+] and minus signs [-] not allowed). Digit or space (entry optional; plus and minus signs not allowed). Digit or space (entry optional; blank positions converted to spaces; plus and minus signs allowed). Letter (A through Z; entry required). Letter (A through Z; entry optional). Letter or digit (entry required). Letter or digit (entry optional). Any character or a space (entry required). Any character or a space (entry optional).