Two IIF statements possible?

R

Randy

I have a text box on my report that can have 3 different results depending
on the situation. The first 2 situations are as follows
=IIf([Text97]+[Text99]+[Text101]<50,50,[Text97]+[Text99]+[Text101]) This
works fine with the 2 possibilities, but I have a third situation of when a
check box is checked on my form (True). If the checkbox [Retest] is
checked, I need to have the previous IIf statement to have a result of 0.
Something like:
IIF([Retest]=True,0,IIf([Text97]+[Text99]+[Text101]<50,50,[Text97]+[Text99]+
[Text101]) I know this is not a correct statement, but what would be a
correct statenment? Thanks...Randy
 
R

Randy

That did it, Thank you...Randy
Douglas J. Steele said:
Very close. All you're missing is an additional closing parenthesis.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Randy said:
I have a text box on my report that can have 3 different results depending
on the situation. The first 2 situations are as follows
=IIf([Text97]+[Text99]+[Text101]<50,50,[Text97]+[Text99]+[Text101]) This
works fine with the 2 possibilities, but I have a third situation of
when
a
check box is checked on my form (True). If the checkbox [Retest] is
checked, I need to have the previous IIf statement to have a result of 0.
Something like:
IIF([Retest]=True,0,IIf([Text97]+[Text99]+[Text101]<50,50,[Text97]+[Text99]+
[Text101]) I know this is not a correct statement, but what would be a
correct statenment? Thanks...Randy
 
S

Steven Chan

Yes, you can use the statement that you have; just add
another ) bracket at the end and it will worked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top