From the course: Access 2016 Essential Training

Unlock the full course today

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

Establishing validation rules

Establishing validation rules

From the course: Access 2016 Essential Training

Start my 1-month free trial

Establishing validation rules

- 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 on our credit cards table. I'm going to double-click on it to review the data that we have inside of here right now. First, I want to make sure that the expiration date here 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 been expired. The other thing I want to do is let's suppose that the hotel can only accept MasterCard and Visa credit cards over here. I want to create a validation rule that ensures that we don't enter in a card from an unsupported merchant. So, let's go ahead and make those changes by switching into Design View. First, let's take a look at the expiration date one. I'll go ahead and click on this button here to select that field and then…

Contents