Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
In this video I want to talk about something that's going to be very important to your database design, and that is Required Fields. Now, in the video that was entitled Creating Our Databases, we just went through and created the structure of our databases, and if I right-click on the Students and go to Design View you can see that this is what we created. Now, this is cool and a lot of designers work this way, and that is get the Field Names correct, get the Data Types correct, and then let's go back in and kind of tweak the design a little bit. Well, here's one tweak you need to consider, and it's right down here. I'm going to click on the Phone field and you're going to notice right down here, Required. And notice the little helpful question over here: Require data entry in this field? Well, let's think this through. We're in the Students table, and so we enroll a new student and whoever is typing data into this particular table is in a hurry and so they just type the student's first name and then the student's last name. Well, guess what? That's not going to help us a whole lot come Tuesday afternoon and little Bobby doesn't show up. So we need to require, say, an Email address and a Phone number so that we can always get in touch with the student. So how do we do that? Well, notice what I'm going to do is, I am going to not require Email but I'm going to click on the Phone column, right here, and then I'm going to come down and if I click here I'll get a drop-down and I can choose Yes, alright? Now there is a shortcut here in Access that you can use and that is to just simply point at Required and double-click and you will notice that it's changing from Yes to No. So, we're going to leave it as Yes, meaning there is a requirement that you input something in the Phone field, alright? And so what I will do now is save that so it doesn't squawk at me when I close out. And then I'm going to go to the Datasheet View and I can actually input something here. Alright, well, I'm going to put a Student ID of 1, and IID of 1, and I'm going to say, you know, Bobby Smith, and then I'm not going to put a Street, City, State, Zip, remember, because I was in a hurry, and I'm not going to put Email or Phone. But notice, when I try to go past Phone by tabbing it comes up and it says, hey, wait a minute. You must enter a value in the Phone field, alright? And so, now I'm going to put in 615/876 dash 87 and I'm going to tab. Now, you know what I just did, right? And that is I didn't put the proper number in there, OK, so that's not going to help me out a lot. But I have required it and so now somebody can't just skip over the field, OK? So that's a Required Field. Now, how do we make sure that they put the right thing in? Well, we're going to do something called Input Masks, and we'll show you that in the next video.
| Course: | Microsoft Access 2010 |
| Author: | Mark Long |
| SKU: | 34224 |
| ISBN: | 1-936334-91-7 |
| Release Date: | 2011-05-12 |
| Duration: | 9 hrs / 121 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |