Discussion Locked

MS Access 97 subtotal for a group

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
A report has been designed that contains 13 columns. Each row represents monthly sales for a product line. Each group of rows represents sale for a salesman. ie grouped by salesman and product. Each column represents a month with column 13 being a total. The formula is [col1] + [col2] + ...[col12]. The textbox control is visible and this field prints correctly. There is a group footer for each salesman and each product line. There is a report footer. In the detail section there is an invisible textbox with the same formula as the one above except that the running sum property is set to "Over All". (call this text106). In the report footer is a text box set to "=text106" to print the report total. This prints correctly. In the detail section there is another invisible text box with the same formula as above except that the running sum property is set to "Over Group". (Call this text107). In the group footer for the saleman group there is a visible text box set to "=text107". I want this to print a total for each set of records for each salesman, but the value of text107 is always the value of the last printed row. ie the group total I am getting is for the product group (the "inner" group) as opposed to the salesman group. How canI make this work the way I want it to?

4 replies

by donq

Sum Expressions should be entered as follows within any group:

=Sum([FieldName])

Begin an expression with an equal sign and then instruct the expression what to do "Sum" and then place whatever you want operated on within a set of brackets "()". Field names always go inside square brackets "[]".

You can also "Count", multiply ([Field1]*[Field2]), divide ([Price]/[Quantity])

by donq

p.s. Ocasionally you can drop the square brackets, and when you have duplicate field names in different tables you need to enter [TableName1].[FieldS]*[TableName2].[FieldS]

Just be sure you place your expression in the proper footer. Report totals = report footer, salesman totals = salesman footer, group totals = group footer.

Good Luck Don Quigg

This discussion is closed to new replies.