and iif help

jedder18

Just Livin the Dream!
Local time
Today, 13:23
Joined
Mar 28, 2012
Messages
135
Trying to come up with the expression for this result

IIf([systemreqcountofworkshop].[course code]="CDV", and IIf(Max([Union X Percents].[%])>0.7,"X"," "))

not working....
need to stop looking at it, :)
Any help

Course code = CDV AND max of % is greater than 70 in order for field to be populated with X

Access 2007
Win2007

Thanks in Advance.

Jen
 
You need to include both parts of that condition in the condition part of the Iif() function. What you have at the moment is saying that if [systemreqcountofworkshop].[course code]="CDV" is true then return Max([Union X Percents].[%])>0.7) otherwise "X" and then error because you have a fourth argument.

This should return the conditions you are looking for:
IIf(([systemreqcountofworkshop].[course code]="CDV") AND (Max([Union X Percents].[%])>0.7),"X"," ")

You should think about changing that field name %, it will cause you problems.


 
Thanks for the help.
Yes, I agree about the name of the field.
Was a quick query and not too late to change.
 

Users who are viewing this thread

Back
Top Bottom