ACC2: Code Called from OnFormat Creates Endless FormattingID: Q113929
|
Moderate: Requires basic macro, coding, and interoperability skills.
A report that calls code from its OnFormat property may never finish
formatting and may become stuck in an internal page formatting loop. This
problem may be more common in databases that have been converted from
Microsoft Access version 1.x to version 2.0.
Press CTRL+BREAK to break the internal processing loop.
With the addition of two-pass formatting for reports in Microsoft Access
version 2.0, events previously called from the OnFormat property may need
to be called from the OnPrint property instead. Or, use the KeepTogether
property in the report's Sorting And Grouping dialog box to keep groups of
records together.
Note that the sample code in the "Steps to Reproduce Problem" section later
in this article is similar to the sample code in article Q100920, "How to
Avoid Abandoned Group Headers in Reports."
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.
Sub GroupHeader3_Format (Cancel As Integer, FormatCount As Integer)
If Me.Top > 4.75 * 1440 Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub
Keywords : kbusage RptProp
Version : 2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 3, 1999