[Music]
we've already looked at how tables store
information in a database but you're not
always going to be entering data
directly into a table much of the time
you're going to be using forms instead a
form gives you a more user-friendly
interface for entering data and they
make sure that the data goes exactly
where it needs to and sometimes the data
just goes to one table but other times
it could be several different tables and
a form can keep track of that so you
don't have to right now we're looking at
the customers form that was created for
our database and this gives us an easy
way of adding or changing information in
the customers table the difference is
here we can just focus on one record at
a time and there are also some
specialized tools like drop-down boxes
and buttons for saving deleting and
printing
we can use a drop-down box to find an
existing customer and we could also type
a last name to jump to a record and when
we click on the name their information
will appear in these fields where we can
then edit it
and I'm just going to change this
customers address
now some fields may have a validation
rule that limits the type of data that
can be entered for example here the
state needs to be a two letter postal
code and if I try to type anything else
a window will pop up with instructions
on how to fill it out correctly
I'll change this back to NC
and when you're done you can click Save
there's also a button to create a new
record which automatically clears all of
the fields so we can type in a new
customers information so if you wanted
to you could do most of these things by
editing the table directly but the form
is going to be a little easier and
faster to use now let's look at a
slightly more complex form and this is
going to let us do things that we really
couldn't do by just editing the tables
I'm going to open the orders form
and this is what the employees will fill
out when the customer places an order
let's just walk through the process of
creating a new order when you click new
order it clears all of the fields and
then you can choose the name of the
customer that's placing the order and
the information in this list comes from
the customers table so every customer
will need to already be in the database
before they can place an order and it
automatically generates a new order
number when you click on the pickup date
field a calendar button appears which
makes it easy to quickly choose the date
that you want
and there are also a couple of
checkboxes for simple yes-or-no
questions later when you start creating
forms you'll be able to add these types
of special tools to make your forms
easier to use and this form has a field
where you can add notes if you want
now here's where this forum is a little
bit different when you click add item it
opens what's called a subform and here
you can choose the item that was ordered
and type in the quantity
and sometimes it may take a few seconds
to update
then you can add another item
and you can do this as many times as you
need to until the order is complete
okay now let's take a look at why forums
are so important when we place an order
with this forum one of the tables that
is modified is order items now it would
be very difficult to edit this table
directly for instance I don't know what
menu item 156 is and I don't remember
which customer placed order number seven
but access can piece together the order
by looking up the correct records in
different tables so tables are sometimes
organized in a way that's easy for
access to read but difficult for a
person to read and that's why we often
have to use forms instead of editing
tables directly
these were just a couple of examples of
forms and the exact content and layout
of a form will vary depending on how the
form is meant to be used but the basic
process of using a form will generally
be very similar and it will be a
combination of typing information into
fields and using drop-down menus buttons
checkboxes and other tools like what you
just saw greatest at a comment subscribe
to our Channel
the freedom to learn
what you want when you want absolutely
free
GCF learn free.org