Others

Hide the Page Header on the First Page of Each Microsoft Access Report Group

Adam DavisAdam Davis Nov 22, 2026 868 views

Question details

Hide a report's page header on the first page of every group while showing it on later pages.

Product
Microsoft Access
Device & OS
not provided
Scenario
A grouped Access report needs each group to start on a new page without a page header on that first page.
Observed behavior
The desired result is a hidden page header at the start of each group and a visible header on subsequent pages of that group.
Before you start

Open the report in Design View and identify the field or expression used to group its records. Make sure the report has a group footer and that the grouping value is available to the report's VBA code.

Solution 1Recommended

Use Format events to suppress the first page header in each group

Use this approach when each group starts on a new page and the page header should appear only on later pages.

The page header's Format event compares the current group value with the last value recorded by the Detail section. The first header is also canceled before any Detail section has been formatted.

The example uses a text grouping field named Category. Replace it with your report's grouping field, and test the result in Print Preview because Access may format report sections more than once during pagination.

1
Start each group on a new page

Open the report in Design View, select the group footer, and set its Force New Page property to After Section in the Property Sheet.

2
Open the report's VBA module

With the report in Design View, open the Property Sheet for the report and use the On Open event's Build button to select Code Builder. Add these declarations at the top of the report module, outside any procedure: Private lastCategory As String Private hasCategory As Boolean

3
Reset the stored group

In the report module, initialize the state when the report opens: Private Sub Report_Open(Cancel As Integer) hasCategory = False lastCategory = "" End Sub If a Report_Open procedure already exists, add the two assignment lines to it instead.

4
Record the current group

Select the Detail section, open its On Format event with Code Builder, and add the group tracking code: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) lastCategory = CStr(Nz(Me!Category, "")) hasCategory = True End Sub Replace Category with the field or control that supplies your grouping value.

5
Cancel the first page header

Select the Page Header section, open its On Format event with Code Builder, and add: Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) If Not hasCategory Then Cancel = True Else Cancel = (CStr(Nz(Me!Category, "")) <> lastCategory) End If End Sub Save the report and open Print Preview to check groups that span one and multiple pages.

Check the grouping value: The comparison must match the report's actual grouping logic. For example, if the report groups dates by month, compare the same month expression rather than the full date. Confirm that the current group value is available when the page header formats; pagination and repeated Format events can affect this method.
Free Microsoft Office alternative

Work with exported Access report data in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with exported report data. It supports common Microsoft Office formats for easier migration, but it does not edit Access reports or run Access VBA.

Open and analyze data exported from Access in WPS Spreadsheets.Supports Microsoft Excel formats such as XLSX and XLS.Use a familiar interface for spreadsheets, documents, and presentations.Work with common Office files in a lightweight suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why must each group start on a new page?

A page header applies to the whole page, not just one group. Starting each group on a new page makes it possible to suppress the header on that group's first page without affecting another group on the same page.

Can I use a group header instead of a group footer for the page break?

Yes. In Design View, select the group header and set Force New Page to Before Section. Use this instead of the footer's After Section setting, and check Print Preview for unwanted blank pages.

How do I adapt the code for groups based on a date?

In the Detail and Page Header On Format events, compare the same expression used by the report's grouping settings. For example, use a year-and-month value if groups distinguish months across different years, rather than comparing only Month(TransactionDate).

Will the page header stay hidden for a one-page group?

It should be canceled on that group's first page, which is also its only page. Verify this in Print Preview alongside groups that span multiple pages.

Can WPS Office change this Access report's VBA events?

No. Edit the report and its Format events in Microsoft Access. You can export report data to an Excel-compatible format and open that data in WPS Spreadsheets.