From the course: Access 2019 Essential Training

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Data validation rules

Data validation rules

From the course: Access 2019 Essential Training

Start my 1-month free trial

Data validation rules

- [Instructor] Validation rules allow you to control what data gets saved in the database. If you try and enter in a value that isn't allowed by the validation rule, access will display a warning and allow you to fix the problem. Let's put some validation rules into effect in out CreditCards table. I'll go ahead and open it up in datasheet view so we can take a look at the columns that we want to affect. First, I want to make sure that the expiration date is either today's date or something in the future. I don't want the ability to enter in a credit card that's already expired. Next, let's supposed that the hotel is only able to accept MasterCard and Visa credit cards. We can create a validation rule that ensures that we don't enter in a card from an unsupported merchant. Let's go ahead and make those changes in Design View. To get there, I can either use the view button here on the home tab, or I can right click on the name of the tab here at the top, or I can right click on the…

Contents