Documente Academic
Documente Profesional
Documente Cultură
Learning Objectives
Introduction
This project uses Access 2002 (also known as
Access XP) to create a form and several reports
for an existing database
The initial database can be downloaded from the
Prentice Hall Web site for the text at
WWW.PRENHALL.COM/MCLEODmcleod
must be in lower-case letters
The database for this project concerns classes and
the books used in those classes
The database also contains records of students
who have copies of books to sell
3
EXAMPLE
This example will generate a form for data entry
into the STUDENT table
It will also create a report of class enrollments and
a list of books used in classes along with their
prices
These exercises illustrate the common applications
for which many people use a database
This project uses the Textbook database which
will be provided by your instructor or can be
downloaded from the Prentice Hall Web site
4
Textbook Database
The Textbook database consists of four tables that
relate to each other by common values. The tables
and their data fields are shown in Figure P9.1
The STUDENT table contains four fields:
FirstName, LastName, BookNumb, and
CopiesToSell. The key fields of the tables are
shown in bold font
For the projects and assignments in this text you
will only have to use an existing database
Any changes to the format or values in fields will
be accomplished through the use of forms and
reports in this project
5
Creating a Form
Entering data into a table can be aided by the use
of a form
Table forms not only allow for data entry but they
display one record from a table at a time
Since a database table can contain very many
records, displaying one record at a time can make
it easier for a user to view records
In our example we will create a form for the
STUDENT table
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ASSIGNMENT
1. Make a form for the CLASS table. Place both the
ClassNumb and Enrollment fields in the form. For the
Enrollment field on the form, create a validation rule that
the value must be less than or equal to 200. When the
validation rule is violated a message should appear stating
Enrollment Must Be Less Than Or Equal To 200.
2. Make a report of books used in each class. The finished
report should look similar to Figure P9.25. Note any
changes in labels from the default field names. Move the
labels Sum and Grand Total to be on the right-hand side
of the totals. Make sure your fields are wide enough to show
the entire field value; that is, do not let the book titles get
truncated by fields that are too narrow. Make sure your
report design does not go past 6.5 inches wide, which would
cause blank pages to appear.
33
34
END OF PROJECT 9
35