Question

Locked

Access 2007 Report

By raguadomartinez ·
I have trouble creating of SUM of a field with a condition. The expresion I'm using is:

=Sum(Iif([Accept),[Price],0))

I want to get a total of the prices, only if Accept = Yes. Accept is a Yes/No field. Price is Int.

I always get the following error message:

'You omitted an operand or operator, you entered an invalid character or comma, or you entered text without sorrounding it in quotation marks'

Any help?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Check your SYNTAX

by ThumbsUp2 In reply to Access 2007 Report

Without even looking up that formula to see what it needs, I can see your left/right brackets (round and square) don't match.

Look closely and you'll see it.

Collapse -

On Syntax

by raguadomartinez In reply to Check your SYNTAX

Sorry I wrote it wrongly on the post .The actual formula is as follows:

=Sum(IIF([Accepted],[Price],0))

What I want is to get a result of all the prices that match Accepted to be true (Yes).

Any ideas on what is wrong with this?

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums