Validation Rules

Setting a validation rule on a field ensures that the correct information is typed into the table. It is also possible to apply Validation Text or a message that will appear should a violation of the rule occur.

Validation rules can be set on a number, text, date/time and currency field.

For example, let’s say you are designing a table for a database and you want to set a validation rule on a field e.g. Quantity field so that values entered into the field are not zero (0 ) you can do this as follows:

  1. Go to the Design View of the table
  2. Select the relevant field – e.g. Quantity field
  3. Go to General tab in the Field Properties section of the screen
  4. In the Validation Rule section type: <>0
  5. In the Validation Text section type: Values entered must not be 0.

Setting Validation Rules

 

 

 

 

 

Try the exercise below and see how you get on.

Worksheet: Setting a Validation Rule