Sum IIf Statement Values on form

  • Thread starter Thread starter Levans digital
  • Start date Start date
L

Levans digital

I have the following expression in a field (CAlLBS) for each record on a
continuous form;
=Nz(IIf(([Pounds]>=[Cubicfeet]*50) Or ([cubicfeet] Is Null),[pounds]),0)

The above works excellent, However I am having problems summing the values
of the (CAlLBS) field using the following =Sum([CalLBS]).

I dont want to store the values in a query being the query has over 200
calculated fields. The query is linked to a SQL Sever via ODBC driver.

Thanks
 
Try summing the expression rather than the calculated field:
=Sum(Nz(IIf(([Pounds]>=[Cubicfeet]*50) Or ([cubicfeet] Is
Null),[pounds]),0))

I'm not sure what you mean about storing the calculation result in a query,
as a query does not store such results, but rather calculates them on
demand.
 
Back
Top