expression

  • Thread starter Thread starter evelyn
  • Start date Start date
E

evelyn

I have form showing birthdays - i have a textbox which
shows age next birthday and when 40 comes up i want to
say "the big", and when 50 come up i want to say "nifty".
I have placed an unbound text box just to the front of
the age next birthday with this expression. ("formage" is
the name of the textbox with the age now)

=IIf([formage]<>49," ","nifty")=IIf([formage]
<>39," ","the big")

instead of printing "the big" and "nifty" i am getting
zeros for these conditions and -1 for all other
conditions.
what have i done wrong in the expression please.
 
How about

IIF(FormAge=50,"Nifty",IIF(Formage=40,"The Big",""))

Your method is returning true or false depending on what is being returned by
the two expressions on the both sides of the = sign.
 
You need to nest the IIf statement, and also use the = sign.
=IIf([formage] = 50, "nifty", IIf([formage] = 40, "the big", " "))

Ragnar
 
oh yes, of course, sorry for the sillyness i was using
two expressions. thank you so much for your patience
 
Back
Top