Avatar of Todd MacPherson
Todd MacPherson
Flag for Canada asked on

Summing Data in Group Footer on Report

I have a grand total footer in a report where I want to sum all values in a textbox called txtNet from a grouping footer. I named a textbox as txtNet in the grouping footer.

The query coming in is such that I must use and unbound control in the Grand Total Footer

I tried =[txtNet] as the control source in the Grand Total Footer and set the running sum to Over All.

Unfortunately it just gives me the last value in textNet not a running sum. How do I fix this?

Microsoft AccessSQL

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)

8/22/2022 - Mon
Jim Dettman (EE MVE)

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Todd MacPherson

Hi Jim

That would not work. Won't let me sum a control. I did solve it by adding in a hidden textbox in the group footer that had the same formula as the visible textbox in the group footer and set it to a running total

I then used the same hidden textbox in the grand total footer - visible of course.

Works like a charm. Given you the points for the effort dude.
Jim Dettman (EE MVE)

<<That would not work. Won't let me sum a control. >>

 You don't sum controls, but fields.

 If you use =Sum(<field name>), in the report footer, it will automatically sum over the entire report.

 Same is true if you use that within a group footer; you will get the sum over the group.

 Of course you can always pass around the value of a text control as you did, but the sum is a little more straight forward as long as what your summing is consistent in terms of how it's calculated.

  If your manipulating the total in anyway as you progress through the report, then you need to pass control values as you did.

  But for what your doing here, you could have just SUM()'d on the field(s).

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes