Re: Question about reports, subreports, and page breaks
- From: "David" <consulttech2004@xxxxxxxxxxx>
- Date: 12 Sep 2006 16:29:05 -0700
Thanks! This solved my problem to a T! :)
Place a page break control just before each sub report, keeping the subs in
the detail section.
In the detail section's on format property add code like this:
If FormatCount = 1 Then
If Me!YourSubRptName.Report.HasData = True then
Me!NameOfFirstPageBreakControl.Visible = True
Me!NameOfFirstPageBreakControl.Visible = False
'........Repeat for each sub report.
That should do it.
"David" <consulttech2004@xxxxxxxxxxx> wrote in message
I have four subreports in a report in the detail section. I suppose I
could move them to the footer of the report. Anyway, if any of them
have data, I want the main report to force a page break. I am trying
to use the "hasdata" property for the subreports, but I am getting the
generic error indicating property not available for object.
How does one tell the main report (using VBA) not to throw in a page
break unless the subreport has data? There has to be an easy set of
code for this. Thanks.