From the course: Access Essential Training (Office 365/Microsoft)
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Data validation rules
From the course: Access Essential Training (Office 365/Microsoft)
Data validation rules
- [Instructor] Validation rules allow you to control what data gets saved in the database. If you try and enter a value that isn't allowed by the validation rule, then Access will display a warning and allow you to fix the problem. Let's put some validation rules into effect on our CreditCards table. First, let's open up the CreditCards table and take a look at what rules we want to enforce. I want to make sure that the ExpirationDate, which is this column right here, let's actually just go ahead and make it a little bit wider so we can see the full header name. I want to make sure that the date that gets put in here is in the future. I don't want the ability to enter in a credit card that's already expired. Next, let's suppose that the hotel is only able to accept MasterCard and Visa credit cards. We can create a validation rule on the CardType column that enforces that rule. We want to make sure that we don't enter in a card from an unsupported merchant. Let's make both of those…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.