Class #7 Lecture

An Introduction to Forms
The Major Steps of a MicroSoft
Access Database






Tables
Queries
Forms
Macros
Reports
Modules
On our road map, we are here!
SESSION
4.1
This section covers creating a form using a form wizard,
changing a form’s autoformat, navigating a form,
preview and printing selected form records and
maintaining table data using a form.
Microsoft Access 2000 Class #7
As shown in Tutorial 1, a form is an
object you use to maintain and
view records Figure 4-5 Completed Order Data Form
from a table
or query.
Forms are
primarily used for
Viewing Data on
Screen.
Forms are usually
designed for visual
appeal, using
colors
and graphics that
are sometimes hard
to print or slow to
print.
Reports on the
other hand are
generally designed
for,
but not limited to,
hard copy output.
We will explore
reports later.
Forms generally come in two flavors.
Bound
and
Un-Bound
A Bound Form is a form that
is used on a
Table or Query.
This means that it will show all or
selected data on the
form that is stored
in the table or query.
You would use this kind of from to
view, edit add or delete data or
entire records that
reside in the
underlying table.
You can also use a bound form to show
only selected fields in a table, hiding or
masking out fields that
you don’t want the user
to view.
The other type of form that
you will frequently
encounter is an
Un-Bound Form
An unbound form is a form
that is not based on a table
or query. It does not contain
data.
Can anyone tell us what an
unbound form would be
used for?
An Unbound Form is generally used
for a Menu that contains buttons or
options that are available to the user.
Since version 1.0 of Access a menu
has been
referred to as a
switchboard
This kind of form can also be used to
contain text only in labels that can provide
instructions or help to the user.
We will be looking at these uses
for forms later in the course.
For today we will be using a
bound form only that is
based on a table.
With Access, you
can design your
own forms or use
one of the Form
Wizards to create
them for you
automatically.
Many times when a form is
created with a wizard, you
will find that either you
forgot something during
the wizard process or the
wizard didn’t create a
form that exactly meets
you needs.
In this case
Access will allow
you to refine or
modify the form
that a wizard
creates, to any
degree needed.
Because of your ability to modify
forms after the fact, the form wizard
is usually a quick way to get started
on a form.
Sometimes, if your demands are not
to great, the wizard might even be
able to create the form you need.
Forms and reports are usually very
easy to create and with the many
available tools are easy to modify.
However, don’t confuse the
terms “Easy” and “Quick”
Depending on
your desires,
forms and reports
can be easy,
but take quite
a bit of time and patience.
We will be exploring ways of
creating our own custom
forms and ways to modify
existing forms later
in the course.
In this session we will be exploring the
process of creating a form
using the Form Wizard.
Tutorial 1 used
the AutoForm Wizard
which created a form automatically using
all the fields in the selected table or query
to create the customer data form.
The Form Wizard allows you to chose
some or all of the fields in the selected
table or query, choose fields
from other tables and
queries and display the
selected fields in any
order on the form.
You can also choose a
style for the form.
During the Form Wizard process, we will
be asked to select a pre-defined format for
our form.
Figure 4-7 AutoFormat Dialog Box
Page AC 4.06
2
0
0
0
The format choices we will be
given are called AutoFormats.
Figure 4-7a Access 97’s AutoFormat Dialog Box
‘97
An AutoFormat is a predefined style for a
form or Report.
An AutoFormat
can be changed
later, at anytime,
after the Form
Wizard has been
completed.
Before you change any part of the design
of a form you first must be in the design
view of that form.
To toggle between the form view and
design view you can click on the View
button found on the design view’s toolbar.
The “Find Command” allows you
to search the data in a form and to
display the records that you are
searching for.
You choose a field to serve as the
basis for the search by making that
field the current field. You can
make a field current by either
tabing into the field or clicking in
the field.
Once the field is selected you can
then activate the “Find in Field
Dialog Box”. This is done by
selecting Edit on the MenuBar and
then Find or by clicking on the
Find Button on the tool bar.
on the Keyboard
will also
accomplish this.
There has been a change in this
procedure in Access 2000. Let’s
look at both ‘97 and 2000
procedures.
‘97
First, Access 97.
2
0
0
0
When the Find in What Field Dialog
Box is activated, you can quickly
check to see if you have selected the
correct field by looking at the title
bar.
‘97
You type the data you are looking
‘97
for in the “Find What” field.
You then choose how you want
Access to search
Up will search from the current record
back to the 1st record.
Down will search from the current
record down to the last record.
‘97
You then choose how you want
Access to search
‘97
All will do a loop, starting at the
current record to last record and then start at
the top and continue down to the record just
before the current record.
You can choose to have a case
sensitive search by clicking in the ‘97
“Match Case” check box.
In Access 2000, when the Find and
Replace Dialog Box is activated, you
can quickly check to see if you have
selected the correct field by looking
at the Look In Field.
Figure 4-9 Find and Replace Dialog Box
Page AC 4.09
2
0
0
0
You type the data you are looking
for in the “Find What” field.
2
0
0
0
You can type the field name that you
wish to look in if you did not select it
before activating the Find and
Replace box or use the lookup arrow
on the right of the box.
2
0
0
0
You then choose how to match
the “Find What:” to the data you
are looking for.
2
0
0
0
Clicking the “More >>” button
will provide us with more “Find”
options.
2
0
0
0
Clicking the “More >>” button
will provide us with more “Find”
options.
2
0
0
0
You then choose how you want
Access to search
2
0
0
0
Up will search from the current record
back to the 1st record.
Down will search from the current
record down to the last record.
2
0
0
0
All will do a loop, starting at the
current record to last record and then
start at the top and continue down to the
record just before the current record.
2
0
0
0
You can choose to have a case
sensitive search by clicking in the
“Match Case” check box.
2
0
0
0
Select this to find data based on its display
format (for example, a date stored as the
number, 1/5/92, but displayed as, 05-Jan-92).
Searching this way is usually slowest.
2
0
0
0
Reference
Window
RW
Finding Data
• On a form or datasheet click anywhere
in the field value you want to search.
• Click Find Button on the
Page AC 4.08
Toolbar (or CTRL+F) to open the Find and Replace
Dialog Box.
In the Find What text box, type the field value you
want to find.
Complete the remaining options, as necessary to
specify the type of search you want.
Click the Find Next button to continue the search.
Click the Cancel button to stop the Search.
•
•
•
•
Quick Check Review
Page AC 4.14
Quick Check
Review
Let’s take a few
moments to break up
into discussion groups.
Each group will discuss
the quick check questions on page
AC 4.14 in your books. We will then
review the answers at the end of the
discussion.
Quick Check Review
Session 4.1
1) Describe the difference between creating a
form using the AutoForm Wizard and creating
a form using the Form Wizard.
Quick Check Review
Session 4.1
2) What is an AutoFormat, and how
do you change one for an existing form?
Quick Check Review
Session 4.1
3) Which table record is displayed in
a form when you press Ctrl + END
while you are in the navigation mode?
Quick Check Review
Session 4.1
4) You can use the Find command to
search for data in a form or _______.
Note: This applies to a datasheet for
a table, query or form.
Quick Check Review
Session 4.1
5) Which wild card character
matches any single alphabetic
character?
Quick Check Review
Session 4.1
6) How many form records does
Access print by default on a page?
Barbara wants to continue to
enhance the Restaurant database
to make it easier for her office
staff and
others to find
and maintain
data.
In particular, she wants the
database to include a form for the
order table, similar to the
Customer Data
Form which is
based on the
Customer
Table.
We will
accomplish this
today using the
Form Wizard.
Your task is to work the
exercises in Tutorial #4
from
Page AC 4.01
through Page AC 4.14
Use Level 1 Disk 1
for this exercise.