Using "IF" to do a SUM

  • Thread starter Thread starter MikeC
  • Start date Start date
M

MikeC

The built-in Dsum function should work:

=DSum("Nz([QuantitySum], 0)","YourTable","[Bonus] = " &
False)
 
MikeC said:
The built-in Dsum function should work:

=DSum("Nz([QuantitySum], 0)","YourTable","[Bonus] = " &
False)
-----Original Message-----
In a report I need to add the quantity to a =SUM( only if the Bonus (a
logical -True or False field) is False. Something like this - If ([Bonus] =
False, =Sum([QuantitySum]). Does any one know the
correct syntax??


I can't see the original post so I'll jump in here.

This can be done with Sum :

=Sum(IIf(Bonus, 0, Quantity))
 
Back
Top