WEBVTT
Kind: captions
Language: en

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

00:00:16.180 --> 00:00:18.930
to be entering data directly into a table.

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

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

00:00:27.320 --> 00:00:29.760
the data goes exactly where it needs to.

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

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

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

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

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

00:00:53.379 --> 00:01:00.379
some specialized tools like drop-down boxes
and buttons for saving, deleting, and printing.

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

00:01:05.480 --> 00:01:08.490
name to jump to a record.

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

00:01:13.280 --> 00:01:14.610
then edit it.

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

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

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

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

00:01:36.450 --> 00:01:43.200
And I'll change this back to NC.

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

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

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

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

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

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

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

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

00:02:16.510 --> 00:02:18.710
customer places an order.

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

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

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

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

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

00:02:39.840 --> 00:02:43.720
And it automatically generates a new order
number.

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

00:02:47.750 --> 00:02:52.550
easy to quickly choose the date that you want.

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

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

00:03:00.720 --> 00:03:03.440
to make your forms easier to use.

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

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

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

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

00:03:24.840 --> 00:03:28.180
save and close.

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

00:03:32.420 --> 00:03:38.190
the Refresh command… and select Refresh.

00:03:38.190 --> 00:03:41.370
Then you can add another item.

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

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

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

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

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

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

00:04:12.690 --> 00:04:15.240
records in different tables.

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

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

00:04:24.780 --> 00:04:28.580
directly.

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

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

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

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

00:04:45.939 --> 00:04:46.660
and other tools.

