IIF Statement calculation

D

DrMojo

i have a field in a subform that has
"=IIf([TotalSales]>=[TempField],25,0)" as its control source. the
subform is in Continuous Forms. the question that i have is how would
i go about summing up the total in the subform footer.

any help would be great.
thanks
drmojo
 
J

John Vinson

i have a field in a subform that has
"=IIf([TotalSales]>=[TempField],25,0)" as its control source. the
subform is in Continuous Forms. the question that i have is how would
i go about summing up the total in the subform footer.

Simplest is to base the Subform on a Query with this field as a
calculated field, and sum that fieldname.

Alternatively, use

=Sum(IIf([TotalSales]>=[TempField],25,0))

and be aware that it will call the IIF function twice as many times,
at a cost in performance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top