JCL
JCL

Reputation: 189

Summing a calculated control in Access continuous form

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

Answers (1)

June7
June7

Reputation: 21370

Aggregate functions must reference fields in RecordSource, not textboxes. Options:

  1. do arithmetic calculation in a query that is form RecordSource then use that constructed field in aggregate function in textbox

  2. repeat the entire arithmetic calculation in aggregate function

Upvotes: 2

Related Questions