totals in report footer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create totals on a report and have the following in the report
footer; Sum([txtEndingBalance]). When I run it the report asks for a value
for parameter txtEndingBalance. What is wrong with the syntax?

Thanks

seeker53
 
You can't sum a control. You can sum fields and expressions. I can only
assume txtEndingBalance is a text box (control).
 
seeker53 said:
I am trying to create totals on a report and have the following in the report
footer; Sum([txtEndingBalance]). When I run it the report asks for a value
for parameter txtEndingBalance. What is wrong with the syntax?


The aggregate functions only operate on fields in the form's
record source table/query, they are unaware of controls on
the form.

If the ending balance text box is just bound to a field or
its control source is an expression of just record source
fields, then use that field or expression in the Sum. E.g.
=Sum(EndingBalance)
or
=Sum(startingbalance + deposit)

If the value of txtEndingBalance is calculated in VBA code
or some other complex expression, then you have to use the
text box's RunningSum property to total the values.
 
Back
Top