Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

syntax while using the expression builder within a query

Posted on 2011-03-23
2
Medium Priority
?
401 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:Jason Jones
2 Comments
 
LVL 6

Accepted Solution

by:
HyperBPP earned 2000 total points
ID: 35199954
Try this:

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

Author Comment

by:Jason Jones
ID: 35199992
Perfect!  thanks!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

877 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