Microsoft KB Archive/303192

= ACC97: Running Sum Produces Incorrect Results =

Article ID: 303192

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q303192



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you create a report that has the Detail section's Visible property set to No, and the Detail section contains a text box that displays a running sum, the first record at the top of each page may display incorrect results.



CAUSE
This behavior can occur if a text box in a group footer references the value of the running sum and the Keep Together property for that grouping is set to No.



RESOLUTION
To resolve this behavior, set the Keep Together property for the grouping to Whole Group:
 * 1) Click the OrderID field, and then on the Report Design toolbar, click Sorting and Grouping.
 * 2) In the Field/Expression box, click OrderID, and then in the Group Footer box, click Yes.
 * 3) In the Keep Together box, click Whole Group, and then quit the Sorting and Grouping dialog box.



Steps to Reproduce the Behavior
 Open the Northwind sample database, and then create a tabular AutoReport that is based on the Order Details table:  In the Database window, click the Reports tab, and then click New. In the New Report dialog box, click AutoReport: Tabular, click the Order Details table in the box at the bottom of the dialog box, and then click OK.  After the report is created, on the View menu, click Design View.</li> In the Detail section, add a text box.</li> Right-click the new text box, click Properties, and then click the Data tab.</li> In the Control Source box, click UnitPrice, and then in the Running Sum box, click OverGroup.</li> Click the Other tab, type RunSum in the Name box, and then close the Properties dialog box.</li> Click the OrderID field, and then on the Report Design toolbar, click Sorting and Grouping.</li> Click OrderID in the Field/Expression box, click Yes in the Group Footer box, and then quit the Sorting and Grouping dialog box.</li> Click the Report Footer section, and then create two text boxes.</li> Right-click the first text box, and then click Properties.</li> Click the Data tab, type =[RunSum] in the Control Source box, and then quit the Properties dialog box.</li> Right-click the second text box, and then click Properties.</li> Click the Data tab, type =[UnitPrice] in the Control Source box, and then quit the Properties dialog box.</li> Right-click the Detail section, and then click Properties.</li> Click the Format tab, click No under Visible, and then close the Properties dialog box.</li> Preview the report, and note that the first record on each page (except the first) produces an erroneous value in the text box that references the RunSum text box.</li></ol>

Additional query words: prb

Keywords: kbprb kbui KB303192

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.