Nested IIF Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 

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

Similar Threads

nested iif function 4
IIf statement not working 4
Nested IIf Headache 1
Nested IIF in Query 2
Nested Iif 5
Nested If conversion to Select case 5
Nested IF or IIF Formula Help 0
IIF Statement #Error 4

Back
Top