ACC1x: Group Footer Controls Calculate Twice at Page BreakLast reviewed: May 14, 1997Article ID: Q104980 |
The information in this article applies to:
SYMPTOMSA group footer control that references a calculated detail control returns incorrect results if the page break and group break occur at the same time. The group footer control is off by the value of the last detail record.
CAUSEReference to a control with the RunningSum property applied from a higher-level group footer causes the control's value to be added again for the last cached running sum and to return incorrect data. All cached field values are validated when you advance the page; this occurs before the record is advanced, determining the end of the group. Thus, the last record in a group is added twice.
RESOLUTIONFrom the OnPrint event of the Detail section, call a macro that uses the SetValue action to place the detail control's value in an unbound group footer control. The Detail section has the following OnPrint properties and control:
OnPrint: Macro1 ControlName: DetailTotal RunningSum: OverGroupThe Group Footer section has the following unbound control:
ControlName: FooterTotal ControlSource: <blank>Macro1 is called from the OnPrint event of the Detail section and has the following action:
SetValue Item=[FooterTotal] Expression=[DetailTotal] STATUSMicrosoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.
MORE INFORMATION
Steps to Reproduce Problem
REFERENCESMicrosoft Access "User's Guide," version 1.0, page 568 |
Keywords : kbusage RptTotal
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |