Force New Page Without Group Header

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

Guest

Hello all:

I have a report in which several sets of records are grouped together in
cases. These cases are interspersed throughout the set of records on the
report, as the majority of records do not belong to a case (and are therefore
not grouped together).

Because of this arrangement, a case can begin anywhere on the page. If
there are some non-case records appearing first, the case might first appear
as the second, third or fourth record on the page. If the records in a case
can fit onto the page where the case begins, I want the format to remain
unchanged. However, if the records will spill onto the following page, I
want the entire case and its records to begin on the next page instead.

I do not have anything in a group header, as keeping everything in the
detail section resolves many other formatting issues that I have worked out.
If it is possible, then, I would like to establish the above conditional
within the Detail section. At present, here are the settings:

Section: Detail
Force New Page: None
New Row or Col: None
Keep Together: Yes
Visible: Yes
Can Grow: Yes
Can Shrink: Yes

Tinkering with these settings has not produced the results I need. Is there
a way to affect this conditional programmatically?

I am open to any suggestions you might have. As always, many thanks in
advance for your time and consideration.

Best,

Joe
 
Access does not provide a way to prevent orphans and widows.

One workaround is to examine the Top property of the report in the Format
event of the (Detail?) section. If it is already too far down the page, then
toggle the Visible property of a Page Break control on to force a new page.

The Top property is measured in twips, where 1440 twips = 1 inch. The page
break control is in the toolbox, and it does have a Visible property even
though the intellisense does not show it.

If you want to keep all records in a group together, another workaround is
to place them in a subreport. Put the subreport in its own section on the
main report, and set that section's Keep Together property to Yes.
 
Back
Top