WEBVTT
Kind: captions
Language: en

00:00:12.089 --> 00:00:15.879
We've already looked at how tables store
information in a database,

00:00:15.879 --> 00:00:19.620
but you're not always going to be
entering data directly into a table.

00:00:19.620 --> 00:00:21.730
Much of the time, you're going to be using
forms

00:00:21.730 --> 00:00:22.730
instead.

00:00:22.730 --> 00:00:26.910
A form gives you a more user-friendly interface
for entering data,

00:00:26.910 --> 00:00:29.900
and they make sure that the
data goes exactly where it needs to.

00:00:29.900 --> 00:00:32.301
Sometimes, the data just goes to one table,
but

00:00:32.301 --> 00:00:34.820
other times it could be several different
tables.

00:00:34.820 --> 00:00:38.640
And a form can keep track of that so you don't
have to.

00:00:38.640 --> 00:00:40.899
Right now, we're looking at the Customers
form

00:00:40.899 --> 00:00:43.260
that was created for our database.

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

00:00:48.440 --> 00:00:50.829
The difference is, here we can just focus
on one

00:00:50.829 --> 00:00:52.440
record at a time,

00:00:52.440 --> 00:00:55.610
and there are also some
specialized tools like drop-down boxes

00:00:55.610 --> 00:00:59.850
and buttons for saving, deleting, and printing.

00:00:59.850 --> 00:01:03.329
We can use a drop-down box to find an existing
customer,

00:01:03.329 --> 00:01:06.990
and we could also type a last name to
jump to a record.

00:01:06.990 --> 00:01:10.460
And when we click on the name, their information
will appear in these fields,

00:01:10.460 --> 00:01:13.329
where we can then edit it.

00:01:13.329 --> 00:01:17.399
I'm just going to change this customer's address

00:01:17.399 --> 00:01:19.549
Some fields may have a validation rule that
limits

00:01:19.549 --> 00:01:21.859
the type of data that can be entered.

00:01:21.859 --> 00:01:26.039
For example, here, the state needs to be a
2-letter postal code,

00:01:26.039 --> 00:01:27.679
and if I try to type anything else,

00:01:27.679 --> 00:01:33.969
a window will pop up with
instructions on how to fill it out correctly.

00:01:33.969 --> 00:01:37.200
And I'll change this back to NC.

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

00:01:40.939 --> 00:01:43.310
There's also a button to create a new record,

00:01:43.310 --> 00:01:45.619
which automatically clears all of the fields
so we

00:01:45.619 --> 00:01:48.509
can type in a new customer's information.

00:01:48.509 --> 00:01:50.319
So if you wanted to, you could do most of
these

00:01:50.319 --> 00:01:52.609
things by editing the table directly,

00:01:52.609 --> 00:01:56.729
but the form is going to be a little easier
and faster to use.

00:01:56.729 --> 00:01:59.340
Now let's look at a slightly more complex
form,

00:01:59.340 --> 00:02:00.759
and this is going to let us do things that
we

00:02:00.759 --> 00:02:04.060
really couldn't do by just editing the tables.

00:02:04.060 --> 00:02:08.009
I'm going to open the Orders form,

00:02:08.009 --> 00:02:11.860
and this is what the employees will fill out
when the customer places an order.

00:02:11.860 --> 00:02:13.730
Let's just walk through the process of creating
a

00:02:13.730 --> 00:02:15.450
new order.

00:02:15.450 --> 00:02:17.430
When you click New Order, it clears all of
the

00:02:17.430 --> 00:02:18.830
fields.

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

00:02:22.140 --> 00:02:25.330
The information in this list comes from the
Customers table,

00:02:25.330 --> 00:02:27.390
so every customer will need to already be
in the

00:02:27.390 --> 00:02:30.719
database before they can place an order.

00:02:30.719 --> 00:02:34.010
And it automatically generates a new order
number.

00:02:34.010 --> 00:02:37.379
When you click on the Pickup Date field, a
calendar button appears,

00:02:37.379 --> 00:02:42.040
which makes it easy to
quickly choose the date that you want.

00:02:42.040 --> 00:02:43.879
And there are also a couple of checkboxes
for

00:02:43.879 --> 00:02:46.010
simple yes or no questions.

00:02:46.010 --> 00:02:48.260
Later, when you start creating forms,

00:02:48.260 --> 00:02:52.769
you'll be able to add these types of special
tools to make your forms easier to use.

00:02:52.769 --> 00:02:55.129
And this form has a field where you can add
notes

00:02:55.129 --> 00:02:57.719
if you want.

00:02:57.719 --> 00:03:00.250
Now here's where this form is a little bit
different.

00:03:00.250 --> 00:03:02.340
When you click Add Item, it opens what's called
a

00:03:02.340 --> 00:03:04.049
sub-form.

00:03:04.049 --> 00:03:07.909
And here you can choose the item that was
ordered,

00:03:07.909 --> 00:03:10.939
and type in the quantity.

00:03:10.939 --> 00:03:16.909
And sometimes it may take a few seconds to
update.

00:03:16.909 --> 00:03:20.010
Then you can add another item.

00:03:20.010 --> 00:03:21.920
And you can do this as many times as you need
to,

00:03:21.920 --> 00:03:24.860
until the order is complete.

00:03:24.860 --> 00:03:29.120
Okay, now let's take a look at why forms are
so

00:03:29.120 --> 00:03:30.459
important.

00:03:30.459 --> 00:03:32.489
When we place an order with this form, one
of the

00:03:32.489 --> 00:03:34.939
tables that is modified is Order Items.

00:03:34.939 --> 00:03:37.709
Now it would be very difficult to edit this
table

00:03:37.709 --> 00:03:38.889
directly.

00:03:38.889 --> 00:03:42.069
For instance, I don't know what Menu Item
156 is,

00:03:42.069 --> 00:03:45.389
and I don't remember which customer placed
order number 7.

00:03:45.389 --> 00:03:47.780
But Access can piece together the order by
looking

00:03:47.780 --> 00:03:50.620
up the correct records in different tables.

00:03:50.620 --> 00:03:52.819
So tables are sometimes organized in a way
that's

00:03:52.819 --> 00:03:54.760
easy for Access to read,

00:03:54.760 --> 00:03:56.879
but difficult for a person to read,

00:03:56.879 --> 00:04:02.209
and that's why we often have to
use forms instead of editing tables directly.

00:04:02.209 --> 00:04:04.560
These were just a couple of examples of forms,

00:04:04.560 --> 00:04:07.110
and the exact content and layout
of a form will vary

00:04:07.110 --> 00:04:09.730
depending on how the form is meant to be used.

00:04:09.730 --> 00:04:13.420
But the basic process of using a form will
generally be very similar,

00:04:13.420 --> 00:04:16.720
and it will be a combination of typing
information into fields,

00:04:16.720 --> 00:04:43.120
and using drop-down menus, buttons, checkboxes,
and other tools.

