Nested IIF Question

H

hghlndr23

I think I know why this is happening but I don't know how to possibly get
around it. In short, I have a field which holds a value of 1 - 5. Using a
form with unbound fields, persons search these fields using 1 of 2 buttons in
an option group. 1 represents anyone with a value of 3 or more. 2
represents a value of 4 or more. My IIF looks like this
IIF([tblSA].[Skill1]>=3;1;IIF([tblSA].[Skill1]>3;2;0)). The criteria then is
the unbound field which holds the 1 or 2. I understand that when the 2 is
selected the first part of the IIF is partially true, but how do I get around
this. When the 1 is selected, it works. But when the 2 is selected, it
returns 0. If anyone has a workaround, I would appreciate it.
 
K

KARL DEWEY

Try this --
IIF([tblSA].[Skill1]>=3,1,IIF([tblSA].[Skill1]<3,2,0))
commas, not semicolons.
less than 3 for second IIF.
Access does not use fuzzy logic, there are no 'partial true' - just True or
False - Yes or No.

--
KARL DEWEY
Build a little - Test a little


hghlndr23 said:
I think I know why this is happening but I don't know how to possibly get
around it. In short, I have a field which holds a value of 1 - 5. Using a
form with unbound fields, persons search these fields using 1 of 2 buttons in
an option group. 1 represents anyone with a value of 3 or more. 2
represents a value of 4 or more. My IIF looks like this
IIF([tblSA].[Skill1]>=3;1;IIF([tblSA].[Skill1]>3;2;0)). The criteria then is
the unbound field which holds the 1 or 2. I understand that when the 2 is
selected the first part of the IIF is partially true, but how do I get around
this. When the 1 is selected, it works. But when the 2 is selected, it
returns 0. If anyone has a workaround, I would appreciate it.
 
Top