Replicate the SUMIF worksheet function in Access

  • Thread starter Thread starter ray
  • Start date Start date
R

ray

Hello All,

I have a need to sum records that are negative and those
that are posititive separetely. How can I do that in a
report footer?

Thanks,
Ray
 
You might set the Control Source property of your control to an expression
something like this for the postive numbers:

=Sum(IIf([Your Field]>0,[Your Field],0))

or like this for the negative ones:

=Sum(IIf([Your Field]<0,[Your Field],0))
 
I have a need to sum records that are negative and those
that are posititive separetely.



DSum("MyField", "MyTable", "MyField>0")

DSum("MyField", "MyTable", "MyField<0")


HTH


Tim F
 
Back
Top