logo
search
Others

How to Suppress Microsoft Access Report Grouping with a Parameter

Anum MushtaqAnum Mushtaq Oct 23, 2026 868 views

Question details

The user wants to conditionally hide group sections in a Microsoft Access report using a parameter, allowing a single report to handle both grouped and ungrouped data presentations.

How to Suppress Access Report Grouping Using a Parameter
Product
Microsoft Access
Device & OS
not provided
Scenario
Creating dynamic database reports where users can choose to see data with or without specific groupings.
Observed behavior
Need to implement a parameter-driven condition to toggle the visibility of the group section dynamically without creating a separate duplicate report.
Before you start

Ensure you have design-level access to the Microsoft Access database and basic familiarity with modifying report events using the Property Sheet.

Solution 1Recommended

Use the On Format Event to Toggle Section Visibility

You can control the display of group headers or footers by reading a parameter in the section's On Format event using VBA.

By dynamically changing the Visible property of a group section during the report's formatting phase, you can reuse one report layout for multiple presentation needs. This is typically done by referencing a parameter from an open form.

1
Open the report in Design View

Right-click your target report in the Access Navigation Pane and select 'Design View' from the context menu.

2
Select the Group Section

Click the bar for the Group Header or Group Footer section that you want to conditionally suppress.

3
Open the Property Sheet

Press F4 or click 'Property Sheet' on the Report Design ribbon to view the section's properties. Switch to the 'Event' tab.

4
Add an On Format event procedure

Find the 'On Format' property row, click the ellipsis (...) button on the right, and choose 'Code Builder' to open the VBA editor.

5
Enter the visibility logic

Write VBA code to evaluate your parameter. For example: If Forms!MyForm!chkUngrouped = True Then Me.GroupHeader0.Visible = False Else Me.GroupHeader0.Visible = True End If.

6
Save and preview

Save the report and switch to Print Preview mode to test both parameter states, ensuring the group section hides and displays as expected.

Use the On Format Event to Toggle Section Visibility
Dynamic Reporting: This method prevents report duplication and ensures your Access database remains clean and maintainable.
Free Microsoft Office alternative

Handle Your Exported Reports Easily with WPS Office

While Microsoft Access handles the backend database logic, you often need to export those reports for presentation and further analysis. WPS Office is a lightweight, free alternative to Microsoft Office that perfectly handles all your exported document needs.

Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint (.pptx) formats.Easily analyze, format, and share exported Access report data using WPS Spreadsheet.Lightweight installation and a familiar tabbed interface requiring no learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Will hiding the group header also hide the detail records?

No. Setting the Visible property of a Group Header or Group Footer to False only hides that specific grouping section. The Detail section containing the actual records will still be processed and displayed.

Why isn't my On Format event firing in Access?

The On Format event only triggers when you preview the report in 'Print Preview' mode or actually send it to the printer. If you are viewing the report in standard 'Report View', format events are ignored by Access.

Can I suppress a report group section using macros instead of VBA?

Yes, you can use the 'SetProperty' macro action within the On Format event of the group section. You would use an 'If' block in the macro to check your parameter and set the Visible property to False.