[schedule]
[basics]
[web
pages] [markup]
[spreadsheets]
[RDBMS]
[presentations]
[UNC] [SILS]
[REB] [How
Stuff Works] [Web
Style Guide] [ATN] [ITS
Tips] [Other Lives] [links]
[starters]
<previous
session]
[next
session>
[RDBMS & tables] [relationships]
[forms
& simple queries] [more
queries & reports] [lab]
[forms]
[subtask 5.3] [simple
queries] [subtask 5.4] [next
time]
Why use forms?
- they give you a way to enter data into your database, display the data
for review, and print it out
- they are designed to make on-screen data entry and retrieval easier,
as well as simplifying movement around your database application
- you can present information in just the way that you want by
combining text, pictures, lines, boxes, and color to create a fully
customized display
- each of the objects in Access has certain specific advantages for
viewing data
- use a table to look at records stored only in that table
- use a query to look at records in multiple tables or to see only
portions of your data
- use a report to group your data and present it in an attractive
printed format
- but to make your data easy to see, enter, retrieve, and edit,
use a form
- a form provides an efficient way to enter data because rather
than typing values into each field in a table, you can create
drop-down lists to select the value you want
- forms do not store the data they present - they keep only your
design parameters, allowing you to tinker with it without affecting
your data
- once you save the form design, it will stay the same until
you modify it
- however, you will retrieve into the form the current
data from the underlying table or query
- forms can be used to retrieve information from more than one table but they must
be based on a single underlying table or query
- so, if you want to pull data
stored in other tables or queries you will need to use subforms
[top]
Forms tools
- the Form tool creates a form tied to the table selected
in the object window. Select Form and you get a form to work
with, though it may not necessarily meet all your needs

[top]
- but it is powerful. If your table is related to one or more other
objects, the Form tool will create a form that displays that relationship


[top]
Form Wizard - the most flexible wizard
- If you wish to create a form that looks at data in
several tables, use the wizard
- It will ask you to select all of the fields that you want to include on the
form, and then prompt you to choose the layout you think will work best.
Unlike the Form options, it requires you to make decisions.
However, it is also the only option that allows you to work with fields stored
in multiple tables to create a main form and a subform. Note that
"You can
choose from more than one table or query."
- to find it, you'll need to look at the options under
More Forms

- note that the wizard allows you to choose fields
from more than one table or query

- a Main/Subform form shows a one-to-many relationship between the data in the
main form and the data in the subform
[top]
Including More than One Table in a Form
- use a subform, a form within a form, to include
information from more than one table in a form
- the primary form is the main form while the form within the form is the subform
- the main form and the subform in this type of
form are linked
- the subform displays only records related to
those displayed in the main form
- Subforms are most effective when you want to
show data from tables or queries with a one-to-many
relationship, like one author with many books
Creating a Form/Subform
- the easiest way to link a main form with a subform is to choose the Form Wizard
when you create a new form
- by following the instructions on-screen, you
can add all the fields to the form and get your desired layout
- you
have to go back into the form's design view and tweak the design to match your
needs
- when you create these forms without this wizard, you must design the main form
and the subform separately
- design your subform and save it just
as you would any other form, and then
you add it to the main form
- you must insert the subform into the main form

the main form is in a single-column format, and the subform is either in a
datasheet or tabular layout

[top]
Controls

Forms use graphical objects, called controls, to link the object back to the
underlying table or query
- Text boxes display names and numbers
stored in your underlying table or query
- Frames show pictures and graphs
- Labels display text as titles or
other markers that describe data, but
are not linked to information in the
underlying table or query
- Other kinds of controls, like lines
and rectangles, visually organize the
information and group data on-screen.
There are three types of basic
controls in Access: unbound, bound, and
calculated
-
Unbound controls allow you to display information that is not stored in the
database
- the title of the form or a descriptive label
- does not have a data source
- adding titles or descriptive
labels, lines, and pictures
-
Bound controls link
information stored in the form's
underlying table or query
-
Calculated controls are a subset of bound controls, but operate on data taken
from the table or query by using an expression
[top]
Two other approaches to forms using Access 2003, from Serena Fenton's INLS461 class
-
Creating Forms in Access
-
Modifying Forms
[top]
© R.E. Bergquist