View Single Post
  #4  
Old December 20th, 2006, 08:10 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default IFF Statement, 3 options

On Wed, 20 Dec 2006 11:38:01 -0800, chickalina wrote:

How come this doesn't work?

=IIf(IsNull([txt_cumulamt7]),"",IIf([txt_cumulamt7]050,"","Benefit
Recognized"),IIf([txt_cumulamt7]1,"",""))

If the field is Null, then nothing appears
If the field is less than 50, but more than 0 then Benefit Recognized
If the field is 0, then nothing goes in the box
Thanks in advance!


You need to repeat the criteria field name each time.
You need to use the And or Or operator when applicable.

=IIf(IsNull([txt_cumulamt7]),"",IIf([txt_cumulamt7] 0 and
[txt_cumulant] 50,"Benefit Recognized","It's equal to or greater than
50 or less than 0"))

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail