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:
- Go to the Design View of the table
- Select the relevant field – e.g. Quantity field
- Go to General tab in the Field Properties section of the screen
- In the Validation Rule section type: <>0
- In the Validation Text section type: Values entered must not be 0.
Try the exercise below and see how you get on.