In a database, it’s often the case that many records will have the same value for a particular field. With an Access table field property called “Default Value,” a suggested input is made during the data entry process. This saves time typing as the suggestion can simply be accepted and the user can immediately move on to entering the next field.
- [Instructor] When you have a field that'll commonly contain the same information, record after record, you can specify a default value to appear when entering in the record. The default value will allow you to simply skip over that field while typing, and it'll automatically put in the most common information. Of course if you'd like to change it you could. The default value is simply a suggestion. Let's go ahead and add one to our guests table. Now we can either do this in data sheet view or design view; the process is gonna be exactly the same. I'll do it design view. Let's go ahead and right-click on the guests table and open it straight into design view.
Now let's suppose the majority of our guests come from the United States. Because of this I could streamline our data entry by setting up a table to automatically suggest United States as the default value for the country field. Let's go ahead and select that, and down in the field properties, we're gonna find the default value property here. I'll click in the box to the right and on the far right side of the screen we'll see that build button that we saw in the last movie. Let's go ahead and click it, and that opens up the expression builder. In the very top of the window is where we're going to type in what I want the default value to say.
I'm gonna enter in a short formula here, it's just gonna be equals, and then double quotes, United States, and then closing quote. This is specifying that I literally want the text United States to appear in the field. And that's all we need to do. Press the okay button, that fills in the default value here, and I'll change my view into data sheet view. Once again, I have made a structural change to the table, so I do need to save this table design. I'll press yes to save it, and then I'll switch my view. Now, I'll come down to the bottom, and I'll press the new record button.
That'll jump me down to the very bottom of the table, and I can start typing in my new record. Right now the guest ID column is activated, so I'll just press the tab key so the access will put in its own guest ID number. I'll type in a name here. And you'll notice that the country field is already filled in. If I wanna accept this default, I'll just press tab and then tab again to skip right over it. If you wanna change it, I can press shift, tab to go back, and change it to whatever value I want. If you don't wanna save this record into your database then just press the escape key and it'll back out.
So that' how the default value works. Now while we're here in data sheet view, I should also point out that we can also set the default value by selecting a field, for instance right now I've got the country field here, then we can go to the table tools contextual tabs, and take a look at the fields tab. Here we have a button to go into the default value, and once again that'll bring us right back to the same expression builder that we saw in design view. I don't need to make any changes now so I'll just press the cancel button to return. So adding default values to your table designs is an easy way to speed up data entry by automatically suggesting the most common value for that particular field.
Released
9/24/2018- Determine the essential uses for the Trust Center.
- Explore the functions of the database Navigation pane.
- Recognize the fundamentals of entering data when using Access.
- Identify the necessary steps when importing a table when using Access.
- Break down the fundamentals of filtering and sorting table data in Access.
- Identify the method utilized when building queries in Design view.
- Determine the role of forms in Access.
- Examine all of the elements involved in maintaining a database in Access.
- Explore how to properly protect an Access database with a password.
Share this video
Embed this video
Video: Set a default value