Solved

syntax while using the expression builder within a query

Posted on 2011-03-23
2
329 Views
Last Modified: 2012-05-11
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
Comment
Question by:upgraders
2 Comments
 
LVL 6

Accepted Solution

by:
HyperBPP earned 500 total points
Comment Utility
Try this:

=FormatCurrency(Sum(IIF([EXEMPT]=0,[BENEFIT],0)))
0
 
LVL 1

Author Comment

by:upgraders
Comment Utility
Perfect!  thanks!!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now