When you have several people entering data in your Access database, you can define how users must enter data in specific fields to help maintain consistency and to make your database easier to manage. For example, you can set an input mask for a form so that users can only enter telephone numbers in the Swedish format or addresses in the French format. You can set a specific format for the input mask, and select another format so that the same data is displayed differently.
You can add input masks to table fields, queries, and to form and report controls.
For example, you can add an input mask to a Date/Time field in a table, or to a text box control on a form that you bind to a Date/Time field. You can also add input masks to form controls, such as text boxes, that you bind to table fields that are set to those data types. If you are unfamiliar with data types, see the article Introduction to data types and field properties.
Input masks provide a set format for data entry in a field by using characters and symbols. When you apply an input mask to a field, anyone who inputs data in that field must follow the specific pattern defined by the input mask.
For example, if the database user enters a phone number without the area code, in this particular mask,
(___) 555-0187 xt. ___
the user will be unable to save the data until the area code data is added. The exact behavior depends on the how the database designer sets up the input mask.
Input masks provide a large amount of data validation and prevent users from entering invalid data (such as a phone number in a date field). Input masks can also help ensure that users enter data in a consistent way. That consistency can make data easier to find and make it easier to maintain your database.
Remember that you define input masks to control the format in which data is entered in the database but you can apply another format to the same data to change how the data is displayed. For example, your input mask can define dates to be entered in a format such as YYYY.MM.DD, but have the date appear as DD-MMM-YYYY.