Tuesday, October 4, 2011

Data Input Masks in Microsoft Access

If you're new to creating databases, you may not have been applying validation rules to the fields you create. In the short term, this may be a problem-free way to take in data, especially if you're the only person who uses the database.

If you have more than one person doing data entry, however, you may want to set up validation rules for your data inputs. This will save time in the long run because it provides an immediate way to assure that data is entered according to a specific format, and that necessary fields are not left empty.

Sonicwall

Inconsistent data can cause reporting problems, and create additional work for the database administrator. Postal codes, phone numbers, serial numbers, dates, titles and any other number of data types can be validated upon entry. If the entered data does not match the specified format, Access will indicate the error and ask the user to re-enter the data using the correct format.

To ensure that data are entered properly, the easiest form of validation involves applying an input mask to a field. Access provides an Input Mask Wizard to make the process easy.

To start the Input Mask Wizard, select the Input Mask property and choose the ellipsis button. Depending upon what you were doing immediately prior to this, Access may ask if you want to save the table you've been working in. Click Yes to save the table. The Input Mask Wizard will provide a list of pre-configured input masks, for example you can choose to force a user to enter a telephone number in a predefined format to prevent data entry errors. Select the mask you want to apply. If no mask suits your needs exactly, choose one that is similar. You'll have the opportunity to fine-tune the mask to your liking. Click Next.

Use the Input Mask box to adjust the input mask to your specifications. Choose the placeholder characters that will serve as examples for your mask and click Next.

Indicate whether or not you want symbols (such as hyphens or parentheses) stored along with your field data. Click Finish.

You can modify a mask to require or restrict the use of specific characters. Characters can also be indicated as optional. Input masks can also be configured with modifiers that don't appear as data, but act on the data. For example, a modifier may convert all entered data to upper case (for example a postcode would always appear as upper case) or lower case letters, insert a thousands separator in a string of numbers, or substitute asterisks for a stored password.

You can also configure literal characters in an input mask. A literal character would be stored with the data and could be a symbol, character or string that is appended to the entered data.

The input mask allows you to standardize data entry and prevent errors that could corrupt searches as your database grows.

Data Input Masks in Microsoft Access

No comments:

Post a Comment