Formatting Issues

Hide the Page Header on the Last Page of an Access Report

Steve KSteve K Nov 20, 2026 868 views

Question details

Suppress the standard page header only on the final page of an Access report.

Hide the Page Header on the Last Page of an Access Report
Product
Microsoft Access
Device & OS
not provided
Scenario
A report ends with a summary page that should not show the page header used on earlier pages.
Observed behavior
The page header properties do not offer an option to hide the header only on the final page.
Before you start

Open the report in Design View and confirm that it has a Page Header section. The database must allow VBA code to run; enable content only if you trust its source.

Solution 1Recommended

Cancel the page header on the final report page

Use the Page Header section's Format event to compare the current page number with the report's total page count.

1
Open the report in Design View

In the Navigation Pane, right-click the report and select Design View.

2
Open the page header event

Select the Page Header section, open the Property Sheet, and choose the Event tab. In the On Format property, select Event Procedure, then click the build button.

3
Add the VBA statement

In the generated Format event procedure, enter `Cancel = (Page = Pages)` between the procedure's opening line and `End Sub`. Save the code and report.

4
Preview the report

Open the report in Print Preview and check that the header appears on earlier pages but not on the final page.

Cancel the page header on the final report page
Check the total page count: If the total page count is not available as expected, add a visible text box to the report footer with a Control Source such as `="Page " & [Page] & " of " & [Pages]`, then test again in Print Preview. Format events do not run in Report View.
Free Microsoft Office alternative

Create and Format Documents with WPS Office

WPS Office is a free, lightweight alternative with familiar editing tools and Microsoft Office format compatibility for an easier move between office suites. It does not replace Microsoft Access or run Access report events.

Format page headers in WPS Writer documents.Open and edit common Microsoft Office formats, including DOCX, XLSX, and PPTX.Use a familiar interface for everyday document editing.Work with a lightweight office suite at no cost.
QA img-9

Frequently Asked Questions

Why doesn't the header disappear in Report View?

The section's Format event does not run in Report View. Open the report in Print Preview to test the event.

What happens if the report has only one page?

That page is also the final page, so `Cancel = (Page = Pages)` suppresses its page header.

How can I make the total page count available to the report?

Add a visible text box to the report footer with a Control Source that references `[Pages]`, such as `="Page " & [Page] & " of " & [Pages]`, and test the report in Print Preview.

Does this code hide the entire last page?

No. When placed in the Page Header section's Format event, the statement cancels that section on the final page; it does not cancel the entire page.