Adding Validation Rule Exercise
Setting up validation for fields
Course project: Adding a validation rule
Objective: Practice using the Validation Rule property to prevent invalid values from being saved.
Exercise scoring
You will receive 10 points for this exercise. The exercise is auto-scored.
When you have completed the steps below, click Submit to receive full credit.
Background and overview
You are the Access database administrator for the marketing and documentation departments of companies in the software and networking business.
A large client needs to ensure that work dates entered into the database are valid and not in the future.
Download files
The Consulting307.mdb database is included in the compressed download file available on the Resources page.
If you already downloaded the database, continue using that version.
Instructions
- Open the Hours table in Design View.
- Select the DateWorked field.
-
Set the field’s Validation Rule property so that the date entered is less than or equal to today’s system date.
Tip: A common rule is <= Date().
- Save the table, then test the rule by attempting to enter a future date.