WEBVTT
Kind: captions
Language: en

00:00:08.029 --> 00:00:14.000
In our last lesson we learned how to create
a form; now we're going to add a record using

00:00:14.000 --> 00:00:17.990
the form.
The field properties we set earlier still

00:00:17.990 --> 00:00:21.680
control the data that is allowed to be entered
here.

00:00:21.680 --> 00:00:28.680
So for the price field I still have to make
sure I enter the price correctly but the one

00:00:29.980 --> 00:00:34.570
thing I don't have to worry about in this
field is the dollar sign because the data

00:00:34.570 --> 00:00:39.510
type we set earlier automatically generates
this for me.

00:00:39.510 --> 00:00:44.379
The same thing goes for the category field.
We must enter one of the categories that we

00:00:44.379 --> 00:00:51.379
told Access to accept.
So if I enter cars here, I get this message.

00:00:53.609 --> 00:00:57.550
We want to make sure we enter a category that's
actually in the book store.

00:00:57.550 --> 00:01:02.420
But what if we don't have all of the category
names memorized? An easier way to make sure

00:01:02.420 --> 00:01:07.750
we enter a valid category is to create a drop
down list that lets us choose which category

00:01:07.750 --> 00:01:12.659
the book belongs to.
Right now we don't have a drop down list so

00:01:12.659 --> 00:01:18.280
we have to type in a category name.
Let's just type in Fiction.

00:01:18.280 --> 00:01:23.280
It's a good idea to save the information you
enter or edit in a form because sometimes

00:01:23.280 --> 00:01:27.630
information will only show up in the table
after you've saved it.

00:01:27.630 --> 00:01:34.630
Let's take a look at our books table to see
if our information saved.

00:01:34.880 --> 00:01:39.359
If the information doesn't show up in the
table you may need to click the Refresh All

00:01:39.359 --> 00:01:44.229
button.
As I said before the form is just another

00:01:44.229 --> 00:01:49.180
way to enter data into a table.
Since the form is supposed to be an easier

00:01:49.180 --> 00:01:54.270
way to enter data, we'll fix that Category
field on the Books form by making a drop down

00:01:54.270 --> 00:01:59.020
list.
Let's look at the Books form in Design view.

00:01:59.020 --> 00:02:05.289
To make a Category drop down list we'll select
List Box or Combo Box from the Controls group

00:02:05.289 --> 00:02:10.210
under the Design tab.
List Box makes a list where you can see several

00:02:10.210 --> 00:02:15.320
choices in a list and a Combo Box makes a
nice drop down menu.

00:02:15.320 --> 00:02:19.360
I'm going to choose the combo box command
from the Controls group.

00:02:19.360 --> 00:02:25.390
When I move my mouse over my form, a crosshair
with a combo box icon appears.

00:02:25.390 --> 00:02:31.970
Since we want to add the list to the category
field, I'm going to left click and draw a

00:02:31.970 --> 00:02:38.010
box right on top of the text box.
I want to make sure I line it up just right!

00:02:38.010 --> 00:02:45.010
I could have deleted the text box but it would
have changed the layout of my form.

00:02:45.540 --> 00:02:49.790
When you release your left mouse button, this
combo box wizard appears.

00:02:49.790 --> 00:02:55.650
We have three options to choose from.
We're going to choose the second option that

00:02:55.650 --> 00:03:00.510
lets us type in our own values.
This is a good choice for us, since the categories

00:03:00.510 --> 00:03:05.150
in our store are pretty constant, we don't
have too many categories and we won't be adding

00:03:05.150 --> 00:03:09.980
new categories very often, so this option
makes sense for us.

00:03:09.980 --> 00:03:14.349
Click next to advance.
On the second screen, we're going to type

00:03:14.349 --> 00:03:21.349
in our category names in this area that looks
like an Excel spreadsheet.

00:03:29.840 --> 00:03:35.900
We only need 1 column of choices for the Category
field but if we had more we could change this

00:03:35.900 --> 00:03:42.900
number here.
Click Next to advance.

00:03:48.549 --> 00:03:51.890
From this part of the wizard we'll choose
the second option.

00:03:51.890 --> 00:03:57.040
This option tells Access that we want to save
the value that the user selects from the category

00:03:57.040 --> 00:04:04.040
list within a field in the table.
Next we select Category because that is the

00:04:05.180 --> 00:04:09.250
field we want to populate.
So when a user selects one of the choices

00:04:09.250 --> 00:04:16.250
in the Category drop down list it saves that
choice in the Category field of the table.

00:04:16.430 --> 00:04:19.720
On the next screen we can give our combo box
a name.

00:04:19.720 --> 00:04:25.770
This field is unnecessary so I'm going to
leave it as is and delete it from Design View.

00:04:25.770 --> 00:04:32.220
Looks like we're finished.
If you look closely you'll see this box to

00:04:32.220 --> 00:04:37.410
the side of the drop down list.
As I said before, it's not necessary so let's

00:04:37.410 --> 00:04:43.280
delete it by selecting it and deleting it.
If I don't delete it, it will show up on our

00:04:43.280 --> 00:04:48.389
form and it's just an eye sore and somewhat
of a distraction.

00:04:48.389 --> 00:04:53.889
Let's go to Form View so we can see what the
drop down looks like.

00:04:53.889 --> 00:04:59.630
If I click on the drop down arrow I can see
all of the categories I entered.

00:04:59.630 --> 00:05:18.520
So now when I enter a record 
I can just click here to input the category.
Once the data has been entered in the Form,

00:05:18.520 --> 00:05:24.889
save it.
You may need to refresh the actual table to

00:05:24.889 --> 00:05:31.889
have the data show up there.
I showed you how to enter a record using a

00:05:31.900 --> 00:05:36.990
form but you can also edit an existing record
using a form.

00:05:36.990 --> 00:05:42.460
In our last lesson we learned how to use Find
and Replace to change information in the Customers

00:05:42.460 --> 00:05:46.490
table - well it works the same way with a
form.

00:05:46.490 --> 00:05:50.289
Right now I'm going to the Navigation Pane
and open the Customers form.

00:05:50.289 --> 00:05:52.970
I'll go to the navigation pane and open the
Customers form.

00:05:52.970 --> 00:05:59.750
Let's find Kiara again.
This time I want to change her zip code.

00:06:03.050 --> 00:06:07.840
Great, I found the record.
Now on my form I'm going to go to the zip

00:06:07.849 --> 00:06:18.090
code field and change it.
Let's save our changes and go back to the

00:06:18.090 --> 00:06:25.090
table and see if it's there, and if not we'll
just hit refresh.

00:06:25.360 --> 00:06:33.090
I told you forms made things easier! In the
next lesson, you'll learn how to create very

00:06:33.090 --> 00:06:38.009
specialized buttons on forms to control even
more of what your user can enter.

