Jim,
 
The is a small issue with the formula structure,
Lets assume you pass the value of 1 in [txtAverageOfAllNumbers]; as per the 
formula it should and will return "2 Inconsistently Fulfills Performance 
Expectations", however if you pass 2.5 you want to return "3 Performance 
Expectations Fulfilled" but the formula will return "2 Inconsistently Fulfills 
Performance Expectations". Here the problem is 2.5 is greater than 1 hence this 
part will be considered not the else part. It is always better to go from the 
upper bound to the lower bound. 
try this one:
 
=
IIf(i <= 1, "1 Fails to Meet Performance Expectations", 
IIf(i >= 5, "5 Consistently Exceeds Performance Expectations", 
IIf(i >= 3, "4Frequently Exceeds PerformanceExpectaitions", 
IIf(i >= 2, "3 Performance Expectations Fulfilled", 
     "2 Inconsistently Fulfills Performance Expectations"
))))


--- On Fri, 8/21/09, luvmymelody <[email protected]> wrote:


From: luvmymelody <[email protected]>
Subject: [ms_access] Nested IIf statement does not work
To: [email protected]
Date: Friday, August 21, 2009, 4:00 AM


  



Hello All,

I have a 7 drop downs that select from a table for a performance evaluations. 
the user selects from the drop down and each value in the drop down is 
calculated and divided by 7 =[txtSumOfAllNumber s]/7 I have another text field 
that I would like to have a corresponding message appear based on the value of 
the txtSumOfAllNumbers field. Below is my IIf statement. I cannot get it to 
work. The calculations have not been worked out based on the actual value that 
I need to base the message on. It would be something like IIf the value of the 
field is <=1.5, "fired", IIf the value of the field is >1.5 and <=2.5, 
"better", IIf the value of the field is >2.5 and <=3.78, "even better" and so 
on.

Here is what I have so far with just even numbers in the expression. The 
expression is on the forms control source.

=IIf([txtAverageOfA llNumbers] <=1,"1 Fails to Meet Performance Expectations" 
,IIf([txtAverage OfAllNumbers] >=1,"2 Inconsistently Fulfills Performance 
Expectations" ,IIf([txtAverage OfAllNumbers] >=2,"3 Performance Expectations 
Fulfilled",IIf( [txtAverageOfAll Numbers]> =3,"4Frequently Exceeds Performance 
Expectaitions" ,IIf([txtAverage OfAllNumbers] >=5,"5 Consistently Exceeds 
Performance Expectations" )))))

Jim Wagner

















      

[Non-text portions of this message have been removed]

Reply via email to