Forgive me because I know that search returns pages and pages on this subject because it seems to be a fundamental flaw. (2010)



I have spent ages but I just can't hide a subReport (and subForm) when it is empty.

I have tried all of the most common suggestions such as:
Cancel = True to the NoData event
Me.Visible = Me.HasData in the footer format event
Me.Visible = Me.Report.HasData in the footer format event
etc.,
The detail section CanShrink is set to Yes

but nothing works. I just can't get rid of the ugly empty subreport / subform.

It DOES disappear from a DoCmd.OutputTo PDF (except that it still leaves the subReport label behind which has to be handled separately.

Painful!