How to avoid blank pages in a report, when there are no data

  • Thread starter Thread starter rmcruz
  • Start date Start date
R

rmcruz

Hello There,

I have a report with a page break, and under it a subreport. So I want to
print data from the subform on a new page. However there are cases that I
have no data to print, and access creates a blank page on the report.
Is there a way to tell access to avoid creating this blank page, everytime
that there are no data to display?

Regards and thanks in advance.

Ricardo
 
You can set the visible property of the page break control based on the
HasData property of your subreport.
Me.PageBreakName.Visible = Me.srptName.Report.HasData
 
Yes, use the HasData property of the subreport to control the visible property
of a page break control.

If you are controlling the printing of the subreport by some other method,
tell us how you are forcing the page break to occur.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Hello Duane,

thank you for your answear.

However I am getting an error.
Where can I set this propertie? Is it on the report open event? It seems
that the control pagebreak has no propertie for visibility.

Thanks again.
 
Sorry, I should have specified the code would be in the On Format event of
the report section containing the page break control and subreport.

The Visible property is there but not exposed in the Property Dialog or
intellisense.
 
Back
Top