Sub rpt Headings

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I need sub reports to print headings even when there is no
detail to print. I have 4 sub reports and when the first
3 do not have any detail, 3 blank pages are put out before
the 4th subreport. I still need the headings of the first
3 sub rpts to print.
 
If there are no records in the subreport, there will be no subreport and no
subreport headings. You can place controls on your main report and make them
visible or invisible based on whether there are records in the subreport or
not.
 
How do you set the controls?

-----Original Message-----
If there are no records in the subreport, there will be no subreport and no
subreport headings. You can place controls on your main report and make them
visible or invisible based on whether there are records in the subreport or
not.

--
Duane Hookom
MS Access MVP
--




.
 
You can use code in the On Format event of the section containing the
subreport like
Dim booHasData as Boolean
booHasData = Me.srptMySubreport.Report.HasData
Me.lblAlternate1Label.Visible = Not booHasData
Me.lblAlternate2Label.Visible = Not booHasData
Of course you will need to use your subreport and control names.
 
Back
Top