• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

syntax while using the expression builder within a query

I have a report in Access 2007 that I am using a SUM function for a Field called Benefit.  The report includes a field called EXEMPT where the value is either 1 or 0  I am trying to create a SUM total of all the BENEFIT numbers where the EXEMPT is <> 1

I know this is not right, but here is the logic:

=FormatCurrency(Sum([BENEFIT])) where EXEMPT <> 1
0
Jason Jones
Asked:
Jason Jones
1 Solution
 
HyperBPPCommented:
Try this:

=FormatCurrency(Sum(IIF([EXEMPT]=0,[BENEFIT],0)))
0
 
Jason JonesGIS/APP DevAuthor Commented:
Perfect!  thanks!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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