Report_HideGrpHdrsIfNoDetail
Sample Db - Explanatory Notes
This sample db demonstrates run time hiding of group headers
and footers in access reports, if there are no longer any printable records for
the group as a result of conditional cancellation of detail section's format
event.
IMPORTANT:
1 - The report must have a calculated text box having [Pages] as part of its expression.
2 - Each group header section should have a text box bound to that level's ControlSource field
3 - If there are any sorting/grouping levels above the last header which do NOT have headers, then for each such level, the
report must include a textbox (may be hidden) located in Detail section, bound to the field serving as group's ControlSource.
USAGE - In Report Module:
===============================
Declarations Section:
Private cRh As New C_CondHeaders_Main
In Report_Open:
Set cRh.ReportObject = Me
In Report_Close:
Set cRh = Nothing
Last statement in existing Detail_Format:
If Cancel = False Then cRh.ShowDetail
===============================
Reference required - DAO 3.6
Version - Access 2000 file format