Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / December 2007

Tip: Looking for answers? Try searching our database.

conditional page break

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard G - 17 Dec 2007 20:17 GMT
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
Marshall Barton - 18 Dec 2007 20:39 GMT
>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
[quoted text clipped - 3 lines]
>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.

Signature

Marsh
MVP [MS Access]

Richard G - 18 Dec 2007 23:29 GMT
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

> >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
[quoted text clipped - 15 lines]
> appropriate controls to their own section and set the
> section's KeepTogether property to Yes.
Marshall Barton - 19 Dec 2007 06:24 GMT
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.
Signature

Marsh
MVP [MS Access]

>I perhaps didn't explain very clearly
>In each case (detail sextion) there are going to be the same text boxes
[quoted text clipped - 29 lines]
>> appropriate controls to their own section and set the
>> section's KeepTogether property to Yes.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.