Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum on subform error

Status
Not open for further replies.

BradCollins

Technical User
Sep 2, 2003
116
AU
I have searched and searched and cannot find anything that would help explain my problem.

I have a continuous subform with a field (fldNetValue) on it, in the form footer I want the total, so obviously the answer is to have a calculated field with a value of '=Sum([fldNetValue])' of course this works on one of my subforms, but on the other i just get the #error response.

Can anyone help shed some light on this and why it is occuring ?

Thank you
 

Is [fldNetValue] entered physically in the records or is it a calculated value? You can't use Aggregate Functions against calcualted fields, you have to use them against the expressions used for the calculations.

In other words, if

FieldC = FieldA - FieldB

you cannot use

=Sum(FieldC)

you have to use

= Sum(FieldA - FieldB)

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
fldNetValue is taken direct from the table so not calculated, not sure what the problem was, but a compact/rebuild seems to have done the trick.

Thanks for your help
 

Glad you got it fixed!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top