conditional page break

R

Richard G

I have a report detail section with several "can grow" text boxes. As such
the detail section can vary from being able to fit two to a page through one
record filling most of a page to one record flowing over into a second page.
I'd like to put a conditional page break in where the top and bottom of the
detail section are not on the same page. I am considering using two page
number boxes at top and bottom of the section with the isvisible property of
the page break but wondered if there is any other easier method

thanks
Richard
 
M

Marshall Barton

Richard said:
I have a report detail section with several "can grow" text boxes. As such
the detail section can vary from being able to fit two to a page through one
record filling most of a page to one record flowing over into a second page.
I'd like to put a conditional page break in where the top and bottom of the
detail section are not on the same page. I am considering using two page
number boxes at top and bottom of the section with the isvisible property of
the page break but wondered if there is any other easier method


This sounds like you want to use a keep together kind of
thing for individual text boxes. Since Access only has the
KeepTogether feature for an entire section (and group), you
need to create more sections do the parts you want to keep
together can be in its own section.

This can be done by creating groups with header and footer
sections in Sorting and Grouping (View menu) on the same
field(s?) you use to sort the details. Then drag the
appropriate controls to their own section and set the
section's KeepTogether property to Yes.
 
R

Richard G

Thanks for the reply
I perhaps didn't explain very clearly
In each case (detail sextion) there are going to be the same text boxes
though possibly of varying heights due to the "can grow" option. What I
would like to try to achieve for aesthetic layout purposes is that where a
record flows over onto a second page is to insert a page break so that the
following record then starts at the top of the next page rather than perhaps
¼ of the way down the current page.
This was why I'd hoped to use a comparison of "page number" between the top
and bottom of the detail section and have a conditional page break if they
were not the same.
Something along the lines of
If page number (top of section) not equal to page number (bottom of section)
then page break is visible

Is this sort of thing possible?
Thanks
Richard
 
M

Marshall Barton

Maybe I'm just not getting it, but the way I am reading your
objective, I don't see how a detail fitting on one page or
needing two pages has anything to do with the esthetics.
Won't you have the same issue if a detail only uses 1/3 of a
page?

If all you want to do is make sure the section is not split
across a page boundary, then just set the detail section's
KeepTogether property to Yes. OTOH, maybe you want every
detail to start on a new page. If so, set the detail
section's ForceNewPage property to Before Section.
 

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