ACC2: OnFormat Event Procedure Triggered Too EarlyID: Q128223
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
The OnFormat event procedure is triggered on the page before a group header
or a group footer section is printed. This problem happens when the
ForceNewPage property is set to Before Section to force the section to
print on the next page. For example, the event is triggered on page 1, but
the section prints on page 2.
If a group header or group footer section's Height property is set to 0 inches, the OnFormat event property is triggered before the section is moved to the next page rather than after.
To work around this problem, set the group header or group footer section's Height property to at least .007 inches.
Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.
The behavior described above can also reset the page number for a group header or group footer incorrectly.
Macro Name Action
--------------------------
GroupHeaderFrmt MsgBox
GroupHeaderFrmt Actions
-------------------------------------------
MsgBox
Message: =[Category Name] & " " & [Page]
ForceNewPage: Before Section
OnFormat: GroupHeaderFrmt
Height: 0
Microsoft Access "User's Guide," version 2.0, Chapter 22, "Sorting and
Grouping Data," pages 547-580
For more information about sorting and grouping, search for "Sorting and
Grouping," and then "Sorting and Grouping Command (View Menu)" using the
Microsoft Access Help menu.
For more information about resetting the page number with group headers and
footers, please see the following article in the Microsoft Knowledge Base:
Q104760 ACC: How to Reset the Page Number on Group Level in a Report
Keywords : kbusage RptLayou
Version : 2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 9, 1999