Designing Your First Database: 2

Validation Rule
One of the other important features of a database is the facility to restrict the data entry of incorrect information. In other words, we don't want someone to type in a reference number, date or product code that would not be understood by the next user of the database. It is not always possible to use validation. Names and address are two examples of this.

We use the following symbols to limit the range of data in fields and later on in queries.

> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
= Equal to
<> Not equal to

You can also used reserved words with these symbols:
And, Between, Or, Not, Is, Like.

We need to enter a validation rule for Date of Birth: >1/1/30. This prevents an entry of anyone born before the 1st January 1930. Enter the other rules as below:

If you don't add the quotes in Department validation, Access does it for you. When you have entered all the fields save the table with the name 'Staff Departments'. Your table should look like this:

Now we need to enter the data (shown on the following page), either in Datasheet view or, go to the Form tab and design a simple data entry form.

Go to the Form tab then select New, and when the box below appears choose the selection shown. The Form Wizard will now generate a blank entry form as shown on the next page. This will help you to enter the data.

Continue