Preparing Your Application to Be Self-Documenting
Fortunately, Access ships with an excellent tool to assist you with the process of documenting your database: the Database Documenter. Although you can use this tool without any special preparation on your part, a little bit of work as you build the components of your application can go a long way toward enhancing the value of the Database Documenter's output.
Documenting Your Tables
The Database Documenter prints all field and table descriptions that you enter in the design of a table. Figure 29.1 shows a table in Design view. Notice the descriptions for the ClientID and StateProvince fields. These descriptions provide additional information that is not readily obvious from looking at the field names. The Table Properties window also contains a Description property. This Database Documenter includes this property when you print the table's documentation.
Figure 29.1. The descriptions that you include for each field appear in the Database Documenter.

Entering a table description also assists you and the users of your database when you are working with the tables in the database. Figure 29.2 shows the Database window after I have entered table descriptions. The description of each table appears in the Database window.
Figure 29.2. The description of each table appears in the Database window.

TIPTable descriptions appear only if you select Details as the format for the objects in the Database window.
Documenting Your Queries
Just as you can enhance the output that the Database Documenter provides for tables, you also can enhance the output it provides for queries. Figure 29.3 shows the Query Properties window. I have filled in the Description property with a detailed description of the purpose of the query. Figure 29.4 shows the description of an individual column in a query. Access includes both the query and field descriptions in the output provided by the Database Documenter.
Figure 29.3. The Description property shows a detailed description of the purpose of the query.

Figure 29.4. You can also describe an individual column in a query.

Documenting Your Forms
Documentation is not limited to table and query objects. A form also has a Description property. You cannot access it from the Design view of the form, though. To view or modify the Description property of a form, follow these steps:
Figure 29.5. You can use the Object Properties dialog box to document each object in the database.

Figure 29.6. The Database window shows a description of a form.

Documenting Your Reports
You document reports in exactly the same manner as forms. Reports have a Description property that you must enter in the Object Properties dialog box. Remember that to access this dialog box, you right-click the object in the Database window and then choose Properties.
Documenting Your Macros
You can document macros in significantly more detail than forms and reports. You can document each individual line of the macro, as shown in Figure 29.7. Not only does this provide documentation in the Database Documenter, but macro comments also become code comments when you convert a macro to a Visual Basic module. In addition to documenting each line of a macro, you can add a description to the macro. As with forms and reports, to accomplish this, right-click the macro from the Database window and choose Properties.
Figure 29.7. You can document a macro by including a description of what each line of the macro does.

Documenting Your Modules
I cannot emphasize enough how important it is to document your modules with comments. Of course, you do not need to document every line of code. I document all areas of my code that I feel are not self-explanatory. Comments assist me when I revisit the code to make modifications and enhancements. They also assist anyone who is responsible for maintaining my code. Finally, they provide the user with documentation about what my application is doing. Comments print with your code modules, as shown later in this chapter in the section "Using the Database Documenter." As with the other objects, you can right-click a module to assign a description to it.
Using Database Properties to Document the Overall Database
In addition to enabling you to assign descriptions to the objects in the database, Microsoft Access enables you to document the database as a whole. You do this by filling in the information included in the Database Properties window. To access a database's properties, choose File, Database Properties or right-click the title bar of the Database window and choose Database Properties. The Database Properties dialog box appears, as shown in Figure 29.8. As you can see, it is a tabbed dialog box; tabs include General, Summary, Statistics, Contents, and Custom.
Figure 29.8. The Database Properties window shows the General properties of a database.

Descriptions of the tabs in the Database Properties dialog box follow:
- General
The General tab displays general information about your database. This includes the date the database was created, when it was last modified, when it was last accessed, its location, its size, its MS-DOS name, and its file attributes. You cannot modify any of the information on the General tab. - Summary
The Summary tab, shown in Figure 29.9, contains modifiable information that describes the database and what it does. This tab includes the database title, its subject, and comments about the database. It also includes the hyperlink base a base address used for all relative hyperlinks inserted in the database. This can be an Internet address (URL) or a filename path (UNC).Figure 29.9. The Summary tab of the Database Properties window contains modifiable information that describes the database and what it does.
- Statistics
The Statistics tab contains statistics of the database, such as when it was created, last modified, and last accessed. - Contents
The Contents tab, shown in Figure 29.10, includes a list of all the objects contained in the database.Figure 29.10. The Contents tab of the Database Properties window includes a list of all the objects contained in the database.
- Custom
The Custom tab enables you to define custom properties associated with the database. This is useful when you are dealing with a large organization with numerous databases, and you want to be able to search for all the databases containing certain properties.