WEBVTT
Kind: captions
Language: en

00:00:08.460 --> 00:00:13.180
We've already looked at how tables store information
in a database, but you're not always going

00:00:13.180 --> 00:00:15.930
to be entering data directly into a table.

00:00:15.930 --> 00:00:19.080
Much of the time, you're going to be using
forms instead.

00:00:19.080 --> 00:00:24.330
A form gives you a more user-friendly interface
for entering data, and they make sure that

00:00:24.330 --> 00:00:26.760
the data goes exactly where it needs to.

00:00:26.760 --> 00:00:31.260
Sometimes, the data just goes to one table,
but other times it could be several different

00:00:31.260 --> 00:00:35.600
tables—and a form can keep track of that
so you don't have to.

00:00:35.600 --> 00:00:40.210
Right now, we're looking at the Customers
form that was created for our database.

00:00:40.210 --> 00:00:45.760
And this gives us an easy way of adding or
changing information in the Customers table.

00:00:45.760 --> 00:00:50.379
The difference is, here we can just focus
on one record at a time, and there are also

00:00:50.379 --> 00:00:57.370
some specialized tools like drop-down boxes
and buttons for saving, deleting, and printing.

00:00:57.370 --> 00:01:02.480
We can use a drop-down box to find an existing
customer… and we could also type a last

00:01:02.480 --> 00:01:05.489
name to jump to a record.

00:01:05.489 --> 00:01:10.270
And when we click on the name… their information
will appear in these fields, where we can

00:01:10.270 --> 00:01:11.610
then edit it.

00:01:11.610 --> 00:01:18.380
I'm just going to change this customer's address.

00:01:18.380 --> 00:01:23.320
Now some fields may have a validation rule
that limits the type of data that can be entered.

00:01:23.320 --> 00:01:27.979
For example, here, the state needs to be a
2-letter postal code, and if I try to type

00:01:27.979 --> 00:01:33.450
anything else, a window will pop up with instructions
on how to fill it out correctly.

00:01:33.450 --> 00:01:40.210
And I'll change this back to NC.

00:01:40.210 --> 00:01:42.950
And when you're done, you can click Save.

00:01:42.950 --> 00:01:49.520
There's also a button to create a new record…
which automatically clears all of the fields

00:01:49.520 --> 00:01:52.829
so we can type in a new customer's information.

00:01:52.829 --> 00:01:56.930
So if you wanted to, you could do most of
these things by editing the table directly,

00:01:56.930 --> 00:02:01.250
but the form is going to be a little easier
and faster to use.

00:02:01.250 --> 00:02:05.060
Now let's look at a slightly more complex
form, and this is going to let us do things

00:02:05.060 --> 00:02:08.570
that we really couldn't do by just editing
the tables.

00:02:08.570 --> 00:02:13.520
I'm going to open the Orders form… and this
is what the employees will fill out when the

00:02:13.520 --> 00:02:15.720
customer places an order.

00:02:15.720 --> 00:02:20.300
Let's just walk through the process of creating
a new order.

00:02:20.300 --> 00:02:24.410
When you click New Order… it clears all
of the fields.

00:02:24.410 --> 00:02:27.690
And then you can choose the name of the customer
that's placing the order.

00:02:27.690 --> 00:02:32.050
The information in this list comes from the
Customers table, so every customer will need

00:02:32.050 --> 00:02:36.850
to already be in the database before they
can place an order.

00:02:36.850 --> 00:02:40.720
And it automatically generates a new order
number.

00:02:40.720 --> 00:02:44.750
When you click on the Pickup Date field, a
calendar button appears… which makes it

00:02:44.750 --> 00:02:49.540
easy to quickly choose the date that you want.

00:02:49.540 --> 00:02:53.300
And there are also a couple of checkboxes
for simple yes or no questions.

00:02:53.300 --> 00:02:57.710
Later, when you start creating forms, you'll
be able to add these types of special tools

00:02:57.710 --> 00:03:00.430
to make your forms easier to use.

00:03:00.430 --> 00:03:07.450
And this form has a field where you can add
notes if you want.

00:03:07.450 --> 00:03:10.200
Now here's where this form is a little bit
different.

00:03:10.200 --> 00:03:14.420
When you click Add Item, it opens what's called
a sub-form.

00:03:14.420 --> 00:03:21.820
And here you can choose the item that was
ordered… type in the quantity… and then

00:03:21.820 --> 00:03:25.170
save and close.

00:03:25.170 --> 00:03:29.420
If the form doesn't update automatically,
you can just go to the drop-down arrow below

00:03:29.420 --> 00:03:35.190
the Refresh command… and select Refresh.

00:03:35.190 --> 00:03:38.370
Then you can add another item.

00:03:38.370 --> 00:03:44.300
And you can do this as many times as you need
to, until the order is complete.

00:03:44.300 --> 00:03:50.830
Okay, now let's take a look at why forms are
so important.

00:03:50.830 --> 00:03:56.680
When we place an order with this form, one
of the tables that is modified is Order Items.

00:03:56.680 --> 00:04:00.120
Now it would be very difficult to edit this
table directly.

00:04:00.120 --> 00:04:04.570
For instance, I don't know what Menu Item
156 is, and I don't remember which customer

00:04:04.570 --> 00:04:09.690
placed order number 7—but Access can piece
together the order by looking up the correct

00:04:09.690 --> 00:04:12.240
records in different tables.

00:04:12.240 --> 00:04:16.930
So tables are sometimes organized in a way
that's easy for Access to read, but difficult

00:04:16.930 --> 00:04:21.759
for a person to read, and that's why we often
have to use forms instead of editing tables

00:04:21.759 --> 00:04:25.569
directly.

00:04:25.569 --> 00:04:29.939
These were just a couple of examples of forms,
and the exact content and layout of a form

00:04:29.939 --> 00:04:33.090
will vary depending on how the form is meant
to be used.

00:04:33.090 --> 00:04:36.960
But the basic process of using a form will
generally be very similar, and it will be

00:04:36.960 --> 00:04:42.939
a combination of typing information into fields,
and using drop-down menus, buttons, checkboxes,

00:04:42.939 --> 00:04:43.660
and other tools.

