conditional sum

  • Thread starter Thread starter Rick B
  • Start date Start date
R

Rick B

Is there something similar in Access as the SumIf function in Excel?

I have a text box on a form which I am trying to tell it to sum a particular
field IF a particular condition within the record is true. I thought the
following would work but it only produces #Error

=Iff([QueryName]![FieldNameFlag]=Yes,Sum([FieldName]),"")

Thank you in advance,

-rick
 
Try this...
=Sum((IIf([field1] = xxx, [field2], 0)))

don't use double qoutes at the end of formula, try a zero
or null instead.
hope that helps.
 
Try using dsum(exp, domain, criteria)
dsum([Fieldname],[query or table],[QueryName]!
[FieldNameFlag]=Yes)
 
Back
Top