Recipe 13.7 Change the Default Settings for New DAPs
13.7.1 Problem
You don't like the
default colors for the background of the caption and footer section,
or for the alternate row in a tabular page. You also wish you
didn't have to change the ConnectionFile property
for every page you create to point to the same
.udl file.
13.7.2 Solution
Access's Tools
Options dialog now includes a Pages page where you can set
defaults for any new pages you create. Changing the defaults will
have no effect on existing pages.
To
see how the color options affect the look of your new pages, follow
these steps:
Create a new DAP. Add a table to the page and request a Tabular
layout. Switch to page view. Unless your defaults have already been changed,
you'll see a caption with a steelblue background,
and every other row will have a whitesmoke background. Close the page. Select Tools Options from the main Access menu. Click the Pages tab.
You'll see the dialog shown in Figure 13-21.
Change the alternate row color to thistle. Edit the Caption Section Style text box to use plum instead of
whitesmoke as the background color. The dialog will now look like
Figure 13-22.
Click the OK button to accept the changes and close the dialog. Create a new page. Add a table to the page and request a Tabular
layout. Switch to page view. You'll now see a caption with a
thistle background, and every other row will have a plum background.
13.7.3 Discussion
We used the
Options dialog to change the look of two sections. All the options
for pages are listed in Table 13-2. You can play
around with these until you find the look you want.
Table 13-2. Page options|
Section Indent
|
Defines the distance between the section and the page margin.
|
Alternate Row Color
|
Defines the color for every other row in a tabular page.
|
Caption Section Style
|
Uses standard HTML syntax to define the style for the caption
section, where it exists.
|
Footer Section Style
|
Uses standard HTML syntax to define the style for the footer section,
where it exists.
|
Use Default Page Folder
|
Specifies whether to store all pages (the actual
.htm files) in a folder other than the folder of
the current database.
|
Default Page Folder
|
If Use Default Page Folder is checked, specifies the folder where
.htm files should be stored.
|
Use Default Connection File
|
Specifies whether to use a connection file (.udl
or .odc) for all new pages.
|
Default Connection File
|
If Use Default Connection File is checked, specifies the connection
file to be used.
|
|