Solved

syntax while using the expression builder within a query

Posted on 2011-03-23
2
354 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
ID: 35199954
Try this:

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

Author Comment

by:upgraders
ID: 35199992
Perfect!  thanks!!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

808 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