Microsoft Access offers two types of mask. They are
- Input mask – An input mask is a path used to impose a certain type of format for all the data included in the same field. Input Mask is mainly used for displaying the data in the correct format and helps you to save type characters like hyphens or parenthesis. Input masks are available ready made for entries like Date, Phone numbers, social security numbers, or zip-codes. These Input masks can be easily selected from the Input mask property box. In short, to simplify the data entry in MS-Access, an Input mask is used.
- Entry mask – An entry mask is used in a field to format the information and control the values whenever the user inserts any character.
Sections in Input mask
The Input mask contains three sections. Each of them are separated by a semi-colon. They are :
- Any mask characters like 0, 9, #, L, ?, A, a, &, C, <, >, !, right, , . , ; : –
- 0 or 1 to have literal place holders that is to be saved with the data or only characters respectively
- The place-holder that needs to be visible on-screen, when the user enters the data. This section is optional.
Example for an Input mask
In the above example,
### is a mask character section
1 represents the data to be stored as it is
– represents the place holders
How to create an Input Mask
- To create an input mask for a field in a table, select that table
- Opt for Switch view
- To receive an input mask for a particular field in a row, click anywhere on the row that has the field.
- Input mask characters can be entered in two ways. Either in Input mask box in the field properties area or using the wizard
- In the field properties area, type the needed Input mask characters in the Input mask box manually
- If you would like to enter an Input mask using the wizard, then follow the steps
- In the field properties area, click on the Input mask box, where you have a desired Input mask to be changed.
- Click on the build button
- From the list box, choose the needed Input mask available and click on next.
- Make all the changes that you would like to do to the place holder or to the characters in the Input Mask and click on next.
- Data can be stored with or without literals. Choose whichever appropriate and then click on finish.