HOWTO: ACC: Explanation of WillContinue Property (141622)



The information in this article applies to:

  • Microsoft Access for Windows 95 7.0
  • Microsoft Access 97

This article was previously published under Q141622
Moderate: Requires basic macro, coding, and interoperability skills.

SUMMARY

This article explains the WillContinue property that is included in Access for Windows 95, version 7.0 and Access 97. This article explains the uses and the limitations of the WillContinue property.

MORE INFORMATION

WillContinue is a report section property that you can examine to determine if part of a section is 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 you reference this property:
   Me.Detail.WillContinue
				

Or, you can reference the Section property of the report:
   Me.Section(0).WillContinue
				
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. WillContinue remains True until the next Print event of the same section occurs (PrintCount > 1). Therefore, you can check the WillContinue property of the Detail section 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 by using the WillContinue property:
  1. Add a label control to a page header of the report, and then set the following properties:
          Name: ContinuedFrom
          Caption: Continued from previous page
          Visible: No
    					
  2. Add a label control to a page footer of the report, and then set the following properties:
          Name: ContinuedOn
          Caption: Continued on next page
          Visible: No
    					
  3. Type the following lines for the OnPrint event procedure of the Detail section:
            Me![ContinuedFrom].Visible = Me.Section(0).WillContinue
            Me![ContinuedOn].Visible = Me.Section(0).WillContinue
    					
NOTE: These properties can return unexpected results if the KeepTogether property of the section 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
  • after the last control
This may cause a small portion of the section to print on one page or the other that does not actually contain a control. The WillContinue property is set to True even if a section is split across a portion that does not contain a control. To minimize this effect, do not leave any blank space at the top or the bottom of the section.

REFERENCES

For more information about the WillContinue property, search the Help Index for WillContinue, or ask the Microsoft Access 97 Office Assistant.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:kbhowto kbusage KB141622