Sum of subform fields in text box unbound.

Afrooman108

New member
Local time
Today, 05:53
Joined
Apr 23, 2012
Messages
9
I want to add a sum of all fields in a subreport called 'Index' the field is called 'Salary Increase'. I want the sum of these fields to be displayed in the unbound textbox called 'Salary'. Please help.
 
In either the Header or Footer of the form you should be able to just put "=Sum[SalaryIncrease])"

Two things to note:

[SalaryIncrease] should be the name of the field in the recordset and not the name of the control (textbox) that displays it on the form/report.

If you are performing a calculation to derive [SalaryIncrease] this won't work. The data must come directly from the query/recordset. Access won't let you do a calculation from another calculation.
 
If you are performing a calculation to derive [SalaryIncrease] this won't work. The data must come directly from the query/recordset. Access won't let you do a calculation from another calculation.
Correct. But it will work if you just repeat the calculation. So if the text box is:
= A + B
then, the sum would be:
=Sum(A + B)
rather than
=Sum(MyCalcField)
 

Users who are viewing this thread

Back
Top Bottom