PageHeader, PageFooter Properties

Applies To

Report.

Description

You can use the PageHeader and PageFooter properties to specify whether a report's page header or page footer is printed on the same page as a report header or report footer. For example, you might not want to print a page header containing the page number on the first page of a report if the report header is a cover sheet.

Setting

The PageHeader and PageFooter properties use the following settings.

Setting

Description

Visual Basic

All Pages

(Default) The page header or footer is printed on all pages of a report.

0

Not With Rpt Hdr

The page header or footer isn't printed on the same page as the report header. Microsoft Access prints the report header on a new page.

1


(continued)

Setting

Description

Visual Basic

Not With Rpt Ftr

The page header or footer isn't printed on the same page as the report footer. Microsoft Access prints the report footer on a new page.

2

Not With Rpt Hdr/Ftr

The page header or footer isn't printed on a page that has either a report header or a report footer. Microsoft Access prints the report header or footer on a new page.

3


You can set these properties by using the report's property sheet, a macro, or Visual Basic.

You can set the PageHeader and PageFooter properties only in report Design view.

Remarks

Microsoft Access normally prints report page headers or page footers on every page in a report, including the first and last.

In report Design view, click Page Header/Footer on the View menu to display the page header and page footer sections.

Note   When forms are printed, page headers and page footers are always printed on all pages.

Example

The following example sets the PageHeader property for a report to Not With Rpt Hdr. To run this example, type the following line in the Debug window for a report named Report1.

Reports!Report1.PageHeader = 1