Saturday, 5 January 2019

Microsoft Access Field Properties – Validation Rule

Validation Rule


Field properties are where you fine tune the table.  The data type provides general information about the type of data that a field is going to contain and in the properties is where you define it more exactly.


The validation rule allows you to set up any rules that the data has to follow.  It is a way of controlling the input of data.  Using the field property will only allow you to set up a rule that applies to that field.  It cannot be used as a way of comparing data in different fields.


You can enter rules such as the employee cannot have a start date of before the company creation date.

The required date cannot be before today’s date.

>=date()

The quantity ordered must be between a particular range.

>=1 and <=500

     or

between 1 and 500

Where key words such as between, and, date() or any other functions are being used, type them in lower case, Access will automatically capitalise the first letter if it has understood it as a key word.

Validation Text 


Validation text is where you type in the error message of a validation rule.  It will be displayed if data is entered that does not follow the rule.

No comments:

Post a Comment