Conditional Page Break

G

gr

I have a report with several subreports. for some of these
subreports after or before them I need to put a Page
break.
but if the subreport is empty I don't want the page break
to happen.
I put the page break in the main report, putting it in the
subreport never does the page break.

How can add a conditional behavior to the page break?
or any other suggestions?
thx
 
S

Steve Schapel

gr,

I did not test this idea, so treat it as "air code". On the On Format
event of the main report's section, put something like this...

Me.NameOfPageBreakControl.Visible = Me.NameOfSubreport.Report.HasData

- Steve Schapel, Microsoft Access MVP
 
G

Guest

yes! worked great!
-----Original Message-----
gr,

I did not test this idea, so treat it as "air code". On the On Format
event of the main report's section, put something like this...

Me.NameOfPageBreakControl.Visible = Me.NameOfSubreport.Report.HasData

- Steve Schapel, Microsoft Access MVP




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top