[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1361
  • Last Modified:

Sum only positive or negative values on an ACCESS 2003 form

I have a form for which I want three values, the sum of all the claim amounts, then the sum of only the positive amounts and a sum of only the negative amounts.  The sum of all claim amounts is easy, but there does not seem to be a SumIf function where I can tell the text control to only sum positive numbers - is this possible?

Sandra
0
ssmith94015
Asked:
ssmith94015
1 Solution
 
NorieVBA ExpertCommented:
Sandra

You could use DSum.

Negative:

=DSum("[YourField]", "[TableOrQueryName]", "[YourField]<0")

Positive:

=DSum("[YourField]", "[TableOrQueryName]", "[YourField]>0")
0
 
ssmith94015Author Commented:
Yes, was missing the idea of the less or greater, thank you.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now