Reputation: 189
I have a continuous form with two fields, weight and rate. For each record, I would like to find (weight/sum of all weights)*rate, and then sum these all up. I can get as far as putting a TotalWeight control in the footer, and the calculated control for each record displaying right. But then when I try to do the final sum in another footer control it gives me an #Error, and the calculated control says #Type. What am I doing wrong?
Upvotes: 0
Views: 962
Reputation: 21370
Aggregate functions must reference fields in RecordSource, not textboxes. Options:
do arithmetic calculation in a query that is form RecordSource then use that constructed field in aggregate function in textbox
repeat the entire arithmetic calculation in aggregate function
Upvotes: 2