Microsoft Office Tutorials and References
In Depth Information
Two sets of navigation buttons appear at the bottom of the Form view window. You use
the top set of navigation buttons to select records from the related table in the subform,
and the bottom set to select records from the primary table in the main form.
You’ll use the navigation buttons to view different records.
To navigate to different main form and subform records:
1. Click the Last Record navigation button in the main form. Record 45 in the Employer
table for Lighthouse Tours becomes the current record in the main form. The subform
shows that this employer has one available Tour Guide position.
2. Click the Previous Record navigation button in the main form. Record 44 in the
Employer table for Harbor Whale Watch Tours becomes the current record in the main form.
3. Select 44 in the record number box for the main form, type 32 , and then press the Enter
key. Record 32 in the Employer table for Windsor Alpine Tours becomes the current record
in the main form. This employer has two available positions.
4. Click the Last Record navigation button
in the subform. Record 2 in the Position table
becomes the current record in the subform.
You have finished your work with the form, so you can close it.
5. Close the form. Both the main form, Employer Positions, and the subform, Position
Subform, appear in the Forms list box. Note that you can open each form separately in
Design view and make changes to it. For example, if you open and modify the Position
Subform, the changes you make will appear the next time you use the Employer Positions
form, since it also contains the subform.
Now you’ll rename the two form objects so that their names do not include spaces, and all
the database objects are named consistently.
6. Right-click Employer Positions , click Rename , delete the space between the words
“Employer” and “Positions,” and then press the Enter key. Repeat this procedure for the
Position Subform object so that the names of both objects do not contain spaces.
You’ve finished your work for Elsa on the forms in the Northeast database.
Creating a Report Using the Report Wizard
As you learned in Tutorial 1, a report is a formatted printout of the contents of one or more
tables in a database. In Access, you can create your own reports or use the Report Wizard
to create them for you. Like the Form Wizard, the Report Wizard asks you a series of ques-
tions and then creates a report based on your answers. Whether you use the Report Wizard
or design your own report, you can change the report’s design after you create it.
Zack wants you to create a report that includes selected employer data from the
Employer table and all the available positions from the Position table for each employer.
Zack has sketched a design of the report he wants (Figure 4-19). Like the
EmployerPositions form you just created, which includes a main form and a subform, the
report will be based on both tables, which are joined in a one-to-many relationship
through the common EmployerID field. As shown in the sketch in Figure 4-19, the
selected employer data from the primary Employer table includes the employer ID and
name, city, state or province, contact first and last names, and phone number. Below the
data for each employer, the report will include the position ID and title, wage, hours per
week, experience, start and end dates, and openings data from the related Position table.
The set of field values for each position is called a detail record .