 |
After creating several tables,
do you remember the design choices you made and why?
Good documentation is important. You may not be the one
who has to maintain the database later. After a month or two have passed and after a
few other projects have occupied your mind, you may get confused yourself
about how all the parts fit together.
You can print a table's datasheet but you
cannot print the Table Design View. So annoying! Access has several features that can help
you document your tables and other objects but
you will have to put the pieces together in your head yourself.
-
Relationships: The
Relationships window can be
printed!
-
Documenter: This handy feature
is not part of the default installation. It produces a detailed list of the features of your tables, including all of
the properties of each field. This is a big mess... until you need what's
in it! Then it is a gold mine!
Tools | Analyze | Documenter
-
Object Dependencies task pane:
In Access
2003 you can see what objects depend on other objects. This is very
helpful when you are thinking about revising or deleting an object. It
takes a bit of practice, however, to understand the tree of
dependencies.
|
 |
 Where you are: JegsWorks >
Lessons >
Databases
Before
you start...
Project 1: Intro
Project 2: Access Basics
Project 3: Tables & Queries

Designing Tables

Design
Tables
Format
Fields
Indexes
Validation
Redesign
Table
Document
a Table
Designing Queries
Summary
Quiz
Exercises Project 4: Forms & Reports
Search
Glossary
Appendix
|
|
|
Step-by-Step: Document a Table |
 |
What you will learn: |
to print Relationships
to print a table datasheet
to document a table with Documenter
to view dependencies |
Start with:
,
projects.mdb open.
Print Relationships
-
Display the Relationships by clicking the Relationships button
.
Problem: Don't see the Relationships button
Why: You are not in the correct
view.
Solution: Switch to Design
View or Database Window.
-
From the menu select |A new window appears which displays the Print Preview of the
Relationships window.
You cannot add a header or footer or make any changes to this page.
-
Click on the Print button
on the toolbar to print this report.
-
Close the print preview window without saving the report.
-
Close the Relationships window.
Print Table Datasheet
-
Open the table Projects in
Datasheet View.
The fields ProjectName and
ProjectDescription are too narrow to show
everything in them. This is exactly how the table will print!
You need to adjust the column and row sizes.
-
Drag
the column for ProjectName wide enough to
see all of the names.
-
Drag the ProjectDescription column
wider and then drag the row to make it taller. All rows
will be the same height!!
-
Open
Print Preview again. Better!
The subdatasheets will not print even if they were open in Table
Datasheet View!
 Problem:
Column headings do not show in the print preview.
Solution: Click on the Setup... button. On the Margins tab, check
the box for Print Headings.
-
Print by clicking the Print button
.
Unfortunately, you do not have much control over table print-outs in
Access. That's why we will be learning about Reports later!
-
Close the table.
Use Documenter
The Documenter report includes a LOT of information.
Exactly what you see depends on what properties have been set for the
table and its fields.
-
From the menu, select | |.
The Documenter window opens.
Problem:
Documenter was not installed:
The default installation of Access does not include this useful
feature. When you click on the Documenter command, Office offers to
install it. It will walk you through the process. You will need the
installation CD.
-
On the Tables tab, check the box for
Projects and click on OK.
Access creates a report and opens it in Print Preview.

Problem: Message appears instead.
If the object that you want to document is still open, it must be
closed first. Just click on Yes.
-
View each page of the
3-page report.
Eek! What a mess! There is a lot more information here than you probably want to
deal with!
Features that do not have settings, like Format
property or Input Mask property, are not shown.
You can scroll within a page but scrolling does not move you to the
next page. You must use the arrow buttons at the bottom of the
window to change pages.

Problem:
Cannot tell how many pages there are.
Nothing in the window tells you how many pages there are in the
report.
Solution: Click on the LastPage button
.
Once that last page displays, you can see in its page number in the
navigation box. That's how many pages are in the report.
Complication: Access must format all of the pages
before it can show you the last page. For long or complex reports,
this can take a long time! If your computer is underpowered, the
whole program can lock up or generate an error.
-
Print the report by clicking the Print button
on the toolbar.
-
Close the report.
-
Find the following information in the report. If your instructor wishes,
highlight or circle the answers on the print-out and label with the
matching letter. Turn your marked
report in for grading.
-
Name of the table
-
Location of the database file
-
Date the table was created
-
Date of the print-out
-
Number of records in the table
-
Size of the ProjectName
field
-
Type of the ProjectDescription field
-
Table(s) related to the table
-
Are cascading deletes and updates allowed?
-
Type of relationship
-
How many indexes are there?
-
Create a Documenter report on the the table
Staff. This table has more fields than the
Projects table, so the report will
be 10 pages! Do not print unless your instructor tells you
to.
-
Find the following information in the
report:
Either mark your print-out or create a document to list your
answers.
-
Name of the table
-
Location of the database file
-
Date the table was created
-
Date of the print-out
-
Number of records in the table
-
Table(s) related to the table
-
Are cascading deletes and updates allowed?
"Not enforced" means that referential integrity is not enforced
and therefore no cascades are allowed.
-
Type of relationship
-
How many indexes are there?
-
What field(s) have a Format property set?
-
What field(s) have an Input Mask?
-
What field(s) have a validation rule and what is
the rule?
View Dependencies
This tree view of dependencies is useful when you are making
changes or deletions to objects in your database. If you look at the dependencies first,
you can avoid embarrassing and time-consuming mistakes. Unfortunately
there is no convenient way to print out this pane.
-
In the Database Window, right click on the
table ProjectStaff.
-
From the popup menu select .
The Object Dependencies task pane opens at the right. It shows the name of the object.
There are two dependency trees - "Objects that I depend on" (the default
view) and "Objects that depend on me". In this case they are
the same... for the moment.
The ProjectStaff table has a relationship
with both the Project table and the
Staff table. As you add other tables and
queries, other objects may appear.
Problem:
No dependencies shown
Solution: Enable "Tracking name
AutoCorrect info" in ||
-
Click on a + button in the pane to expand the dependencies
tree. These can be nested up to 8 deep but you can only navigate through
4 levels. When expanded, it looks very
confusing because the same object will often appear in several places.
Dependencies can be a tangle of relationships that loop back on
themselves! The key facts are simple. Objects that
are dependent on each other cannot be deleted arbitrarily! It takes
careful thinking.
Preferred
Method: The right click menu is the preferred way to show the
Object Dependencies for an object. With this method it is clear to
Access that you want to see dependencies for the selected object. Other
methods may not make Access forget what the last object was! So
frustrating!!
|