Define validation rules to control what values can be entered into a field

Define validation rules to control what values can be entered into a field

  1. Open a table in Design view.

  2. In the upper portion of the window, click the field you want to define a validation rule for.

  3. In the lower portion of the window on the General tab, click the ValidationRule property box, and then type the validation rule, or click the Build button to create the validation rule using the Expression Builder.

    For example, you could define the validation expression ">9" for a Quantity field to prevent a user from placing an order for fewer than 10 units.

  4. In the ValidationText property box, type the message that you want displayed when the rule is broken.

    For example, for the validation expression ">9", you could enter "You must order 10 or more units." To view more examples of field validation rules, click .

    If you set a validation rule in a field that contains data, Microsoft Access will ask if you want to apply the new rule to existing data when you save the table.

Notes