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.
The Required field property
This lesson explains how you can make sure that a field has a value for each record.
-
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.
-
Click the LastName field.
Here's how to prevent a user from leaving out data in a field.
-
Click the Required list arrow and select Yes, as shown in figure.
Let's see how the new default value works.
-
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.
-
Click the New Record button on the Record Navigation bar.
Access adds a new blank record to the table.
-
Enter a new record with your own information. Leave the LastName field blank, however.
Let's see what happens...
-
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:
-
make sure the table is displayed in design view and click the field you want to require data entry for.
-
click the required box in the field properties section.
-
click the list arrow and select yes.