10.5 Programmatically Track Users and Groups

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 figs/u2192.gif 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:

  1. Create a new DAP. Add a table to the page and request a Tabular layout.

  2. 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.

  3. Close the page.

  4. Select Tools figs/u2192.gif Options from the main Access menu. Click the Pages tab. You'll see the dialog shown in Figure 13-21.

    Figure 13-21. The default Pages options

    figs/acb_1321.gif

  5. Change the alternate row color to thistle.

  6. 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.

    Figure 13-22. The Pages options after editing

    figs/acb_1322.gif

  7. Click the OK button to accept the changes and close the dialog.

  8. Create a new page. Add a table to the page and request a Tabular layout.

  9. 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

Option

Description

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

 



Access Cookbook
Access Data Analysis Cookbook (Cookbooks)
ISBN: 0596101228
EAN: 2147483647
Year: 2005
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net