Cannot SUM a *calculated* field??

RSIboy

Registered User.
Local time
Today, 01:54
Joined
Jul 1, 2004
Messages
32
Hi

I have a report showing customer name, sales, and a 'commission due' column, which is a calculated field. For simplicity, lets say this field looks at whether the customer is an 'A' or 'B' customer - if A the commission rate is 30%, if B it is 20%, so I have a calculated field in the report that says

=IIf([CustomerStatus]="A",[Sales]*.3,[Sales*.2])

which is formatted as currency, and I have set the name as CommDue.

My problem is in the footer of the report - I had assumed I could make a grand total field, in which I would enter

=Sum([CommDue])

but when I try this Access gives me a 'Enter Parameter Value' box, asking me to input a value for 'CommDue'?

What am I doing wrong? Any advice much appreciated....

Dale
Manchester, UK
 
a search here would have given the answer, it comes up on a regular basis.
You have to repeat the calculation =Sum(IIf([CustomerStatus]="A",[Sales]*.3,[Sales*.2]))
 

Users who are viewing this thread

Back
Top Bottom