Iif statement help (1 Viewer)

mkelly

Registered User.
Local time
Yesterday, 23:24
Joined
Apr 10, 2002
Messages
213
I have a report that I need a text box to show 1 if the number is <.3 and show 2 if the number is >.3 and <=.7 then leave it blank if over .7.

This is my statement:
=IIf([text17]<=0.3,"1",IIf([text17]>0.3<=0.7,"2",""))

However it gives a 2 even if the number is over .7

Any help appriciated.

thanks
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:24
Joined
Sep 12, 2006
Messages
15,710
slight syntax error

after testing for <0.3, the next test only needs to be <0.7, since youve already handled the previous case

hence

=IIf([text17]<=0.3,"1", IIf([text17]<=0.7,"2","leave blank"))


its the construct >0.3<0.7 thats confusing access
 

mkelly

Registered User.
Local time
Yesterday, 23:24
Joined
Apr 10, 2002
Messages
213
Gemma-the-husky

Thanks works great, had a brain fart over here.
 

Users who are viewing this thread

Top Bottom