[Previous] [Content Page] [Next]

Requiring Data Entry

The Required field property

In most tables, there are usually at least a few fields that absolutely must contain data in order for the record to be meaningful. For example, at the absolute minimum, a customer record needs to have the customer's first and last nameotherwise, why bother entering it? You can specify that a field must contain data to prevent users from leaving out important information when they are entering data.

This lesson explains how you can make sure that a field has a value for each record.

  1. Switch to Design view by clicking the View button on the toolbar.

    You decide to specify that the LastName field must contain data for each record.

  2. Click the LastName field.

    Here's how to prevent a user from leaving out data in a field.

  3. Click the Required list arrow and select Yes, as shown in figure.

    Let's see how the new default value works.

  4. Click the Save button on the toolbar to save your changes, click No to close the message about testing existing data, and then click the View button to display the table in Datasheet view.

    You will need to add a new record in order to see any default values.

  5. Click the New Record button on the Record Navigation bar.

    Access adds a new blank record to the table.

  6. Enter a new record with your own information. Leave the LastName field blank, however.

    Let's see what happens...

  7. When you have finished entering the record, click in any other record or press Ctrl + Enter to save the record.

    Access displays a dialog box that states that the LastName field cannot contain a null value.

TO REQUIRE DATA ENTRY FOR A FIELD:

  1. MAKE SURE THE TABLE IS DISPLAYED IN DESIGN VIEW AND CLICK THE FIELD YOU WANT TO REQUIRE DATA ENTRY FOR.

  2. CLICK THE REQUIRED BOX IN THE FIELD PROPERTIES SECTION.

  3. CLICK THE LIST ARROW AND SELECT YES.

[Previous] [Content Page] [Next]