can you insert a page break in code?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Wihtout using grouping or forcing a new page or the page break control in
report design mode, how do you force a new page in the vb editor? Depending
on certain conditions, I want the code in the report to insert or start on a
new page right then and there. The closest thing I know is this:
GroupHeader0.forcenewpage = 1 but it does not take effect until the next time
the group header format comes around. Is there like a doCmd.newpage or
something I can use? I want certain report information to start on a new
page based on conditions. Anyone know the answer?
Thanks for any help
 
Wihtout using grouping or forcing a new page or the page break control in
report design mode, how do you force a new page in the vb editor? Depending
on certain conditions, I want the code in the report to insert or start on a
new page right then and there. The closest thing I know is this:
GroupHeader0.forcenewpage = 1 but it does not take effect until the next time
the group header format comes around. Is there like a doCmd.newpage or
something I can use? I want certain report information to start on a new
page based on conditions. Anyone know the answer?
Thanks for any help

Do you have a problem with using the control's that Access supplies
you with?

Sure you can use a condition to force a page break, but you first need
to add a Page Break control to the section.
Then code the Section's format event:

PageBreakName.Visible = [SomeControl] = some value
 
Back
Top