Very simple IIF ?

maw230

somewhat competent
Local time
Today, 10:46
Joined
Dec 9, 2009
Messages
520
I want my IIF statement to not show a record if it is False.

IIF(([value1])<>([value2]), ([value1]), *do not return record*)

can't seem to find what i should use there.
 
It needs to be in your criteria.
need more information to assist further.
 
How about:

IIF([value1]<>[value2], [value1], "")

EDIT: And you don't need all of those parentheses...
 
SOS, won't that just leave the field blank? I want it to not show the entire record. here is the actual code that i have in the 'Field' portion of design view:

Code:
Price: IIf(([JDNETP]<>0.59*[JDLIST]),[JDNETP],Null)

I tried Null but it just leaves the field blank while still returning the record.
 
To NOT return a record, it needs to be in your Criteria, not at a field level.

WHERE ([JDNETP]<>0.59*[JDLIST]) as an example
 
If you don't want it to show the entire record then you just need to put this in the criteria of value1 (no IIF needed):

<>[Value2]
 
i tried that but i was unable to use the sums and group by's, because blah blah is "not part of an aggregate function."

i need to use the sum function in that query.
 
No, you can select your field again at the end of your grid and change the GROUP BY to WHERE and then use that in the criteria.
 
i see what you're saying. looks to be working fine. thanks a lot everyone :)
 

Users who are viewing this thread

Back
Top Bottom