
Originally Posted by
Missinglinq
First off, when using Functions like Sum() you must use the Field name, not the Textbox name! If they're both the same (as Access names them when a Field is dragged onto a Form) it will work, but if the two names are different, you must use the name of the Control's underlying Field.
To Calculate a Total, in Form Design View, in the SubForm's Footer, place a Unbound Textbox.
To simply total a Single Field, the Control Source of this new Textbox would be
=Sum([Field1])
If the Field is a Calculated Value you must Sum() the Calculation, not the Field itself!
So, if
MySubTotal = Field1 + Field2
You cannot use
=Sum([MySubTotal])
Instead, you must use
= Sum([Field1[ + [Field2])
Now, to place the totals on the Main Form:
Create an Unbound Textbox, and use this in its Control Source
=SubformName.Form!SFTotalTextboxName
Note that SubformName has to be the name of the Subform Control, and not the name of the Form the Subform is based on, unless the two are the same.
SFTotalTextboxName is the name of the Textbox on the Subform where the calculation is done.
Linq ;0)>