Secondary Teaching Resources for I.C.T.

Databases

What is a database?
Access
How to make a new table
Data Types
Input Masks
Data Validation
Lookup values
Primary Keys
Queries
Aggregate Queries
Forms
Reports

Resources

Links

 

 

 

Databases

Data Validation

One of the huge benefits that a computerised database can give the users is called Data Validation. Data Validation means that the data is checked to see if it makes sense (or is valid), as it is entered. If the user seems to have entered a meaningless value, the database can refuse to accept the entry and prompt them for a more sensible value by displaying a message on the screen.

Validation Rules

As well as input masks, Access has another powerful tool for data validation, which it calls the validation rule.

The validation rule has two parts, firstly we have the rule itself, and secondly we have the validation text, which is simply a message that the user will see if they input data that breaks the rule.

To use a validation rule, you need to define an expression that describes the data that you will allow. You can use the following symbols:-

Operator

Meaning

<

Less Than

>

Greater than

=

Equal to

<>

Not Equal to

<=

Less than or equal to

>=

Greater than or equal to

IN

Test for "equal to" any member of a list, comparison value must be a list enclosed by brackets

BETWEEN

Test for a range of values. Comparison value must be two values ( a low and a high value), separated by the word AND

LIKE

Can be used to test a text field to see if it matches a pattern.

 

Examples of Validation rules

Here are some examples of validation rules:-

To make sure you have a valid month

BETWEEN 1 AND 12

 

To make sure you have a valid lesson

BETWEEN 1 AND 5

Click here to return to the top of the page

Click here to find out how to make Lookup values

 

Page last updated on October 25, 2002
Contact webmaster, Philip Waud by clicking here