In my report I have an unbound text box [Text25] that shows a percentage
based on the values in two other text boxes (ex: =[Text22]/[Text23]). In a
fourth box [Text4], I have the following conditional statement:
=IIf([Text25]>=".9500","Pass","Fail")
This statement works the first time, but if the values change in [Text25] to
below 95%, the value in [Text4] still returns "Pass" unless I fiddle with the
statement and then try it again.
Am I wrong to assume that if the value in [Text25] drops below 95%, [Text4]
should read "Fail" which is the desired outcome?
What have I done wrong? How do I fix this statement to produce the desired
outcome every time?
Thanks in advance for your assistance.

Signature
Michael
KARL DEWEY - 01 Nov 2007 00:24 GMT
Use this in [Text4] ----
=IIf([Text22]/[Text23] >=.9500,"Pass","Fail")
Use no quotes around the numerical value .9500 as that makes it text.

Signature
KARL DEWEY
Build a little - Test a little
> In my report I have an unbound text box [Text25] that shows a percentage
> based on the values in two other text boxes (ex: =[Text22]/[Text23]). In a
[quoted text clipped - 12 lines]
>
> Thanks in advance for your assistance.
fredg - 01 Nov 2007 04:07 GMT
> In my report I have an unbound text box [Text25] that shows a percentage
> based on the values in two other text boxes (ex: =[Text22]/[Text23]). In a
[quoted text clipped - 12 lines]
>
> Thanks in advance for your assistance.
If I read your statement correctly, Text25 is a Number value.
YetText4 asks if Text25 >=".9500"
Placing the .9500 within quotes makes the value a string.
Try it this way:
=IIf([Text25]>=.9500,"Pass","Fail")
or perhaps this way, by repeating the original calculation (which is
the way I would do it if you don't need to show the actual number
amount).
=IIf([Text22]/[Text23] >= .9500,"Pass","Fail")

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Michael_100 - 01 Nov 2007 15:41 GMT
Thank you Karl and Fred! Your help is appreciated.

Signature
Michael
> > In my report I have an unbound text box [Text25] that shows a percentage
> > based on the values in two other text boxes (ex: =[Text22]/[Text23]). In a
[quoted text clipped - 25 lines]
> amount).
> =IIf([Text22]/[Text23] >= .9500,"Pass","Fail")