---Posted by Vinod Kumar--- 27/3/2001
Explanation of HasContinued and WillContinue Properties
This
article pointer was forwarded to you from the Microsoft Online Support site. http://support.microsoft.com/support/kb/articles/Q141/6/22.asp
Moderate:
Requires basic macro, coding, and interoperability skills.
This article explains the HasContinued and WillContinue properties that are
included in Microsoft Access 7.0 and 97, their usage, and their limitations.
HasContinued
and WillContinue are report section properties that you can inspect to
determine if part of a section has printed on the previous page or if part of a
section will be printed on the next page.
You can either use the section name (as defined in the properties sheet) when
referring to these properties:
Me.Detail.WillContinue
Or you can reference the report's Section property:
Me.Section(0).WillContinue
HasContinued is set when the Format event for the section occurs and evaluates
to True if a portion of the current section was printed on the previous page. Because
the Format event occurs prior to the Print event, HasContinued is only set to
True if the FormatCount > 1 (the portion of the section on the next page is
being formatted). Because of this, you can't determine if the detail section
"has continued" by checking the HasContinued property in page header
or page footer events. HasContinued is only useful when inspecting the property
from within the section's own event procedures.
WillContinue is set when the Print event for the section occurs and evaluates
to True if a portion of the current section will be printed on the next page.
It remains True until the same section's next Print event occurs (PrintCount
> 1). Therefore, you can check the detail section's WillContinue property in
page header or page footer events.
Following are steps to toggle the Visible property of a "Continued from
previous page" label in the page header and a "Continued on next
page" label in the page footer using the WillContinue property:
2. Name: ContinuedFrom
3. Caption: Continued from previous page
Visible: No
5. Name: ContinuedOn
6. Caption: Continued on next page
Visible: No
8. Me![ContinuedFrom].Visible = Me.Section(0).WillContinue
Me![ContinuedOn].Visible = Me.Section(0).WillContinue
NOTE: These properties can return unexpected results if the section's KeepTogether property is set to No. With the KeepTogether property set to No, the section may break between pages at any point in the section: between controls, before the first control, or after the last control. This may cause a small portion of the section to be printed on one page or the other that doesn't actually contain a control. The HasContinued and WillContinue properties will be set to True even if a section is split across a portion that doesn't contain a control. To minimize this effect do not leave any blank space at the top or bottom of the section.