Better relationship documentation
You most likely supply detailed documentation of completed projects to your clients. The Documenter that you probably use is a very thorough tool. However, it doesn't produce reports that show entire tables when you document relationships--it just shows the linking fields. If you need to collaborate with developers that aren't familiar with your data, a report that resembles Access' Relationship window is much more useful. When using prior versions, you needed to use code, print a screenshot, or use an add-in to generate this kind of report. It's now a built-in feature of Access 2000.
To generate a relationship report, click the Relationship button on the Database toolbar. Then, choose File/Print Relationships from the menu bar. Access produces a report in Print Preview that resembles the one shown in Figure A. You can then save or print it just like any other Access report.
Figure A: Access 2000 adds the ability to print table
relationships.
Take a hands-on approach to table relationships
Although the Graphical User Interface (GUI) has revolutionized the way we use computers, it's still a fact that using a mouse is sometimes more of a hindrance than help. For example, database programmers that are used to hacking away at code may find that constantly switching between the mouse and keyboard disrupts their work rhythm. Access 2000 rectifies this by making it possible to create and edit relationships without ever taking your hands off the keyboard. In previous versions of Access, you could easily get to the Relationship window with the keyboard ([Alt]T, followed by R). Once the window was open, you could display the Show Table dialog box to add tables with the keyboard ([Alt]R, followed by T). However, you then had to use the mouse to edit or establish a relationship between two tables.
Access 2000 simplifies this process by always enabling the Edit Relationships menu command instead of just making it available when a relationship line is selected. To edit or create joins with the keyboard, open the Relationship window and press [Alt]R, followed by R.
Access displays the Edit Relationships dialog box, shown in Figure B. We'll first look at how to edit an existing relationship.
Figure B: You can now create or edit existing relationships with
just your keyboard.
The Edit Relationships dialog box has been modified in Access 2000 to include two new dropdown lists. The Table/Query dropdown list allows you to select any table from the Relationship window that's on the left side of an existing relationship. The Related Table/Query dropdown list lets you select any table that's related to it. After making your selections, define the joined fields using the dropdown lists below the table selections. When you finish making changes, press [Enter] (or click OK).
You'll find that the relationship is selected when Access returns you to the Relationship window. Because of this, you can also delete relationships with your keyboard. Simply select the join you want to remove using the Edit Relationships dialog box, press [Enter], and then press [Delete].
To create a new relationship from the Edit Relationships dialog box, press [Alt]N (or click the Create New button). On the resulting Create New dialog box, use the Left Table Name and Right Table Name dropdown lists to select any of the tables that are visible in the Relationship window. Set the joined fields using the Left Column Name and Right Column Name dropdown lists, as shown in Figure C.
Figure C: Use the Create New dialog box to define a relationship
between any tables that are visible in the Relationship window.
When you finish setting up the relationship, press [Enter] to return to the Edit Relationships dialog box and set any desired join or referential integrity options. A word of warning at this point: because the Create New button is still enabled you may assume that you can immediately define another relationship. However, this isn't the case--you must press [Alt]C or click Create to finalize the relationship creation.
Copyright © 1999, ZD
Inc. All rights reserved. ZD Journals and the ZD Journals logo are trademarks of ZD
Inc. Reproduction in whole or in part in any form or medium without
express written permission of ZD Inc. is prohibited. All other product
names and logos are trademarks or registered trademarks of their
respective owners.