
Originally Posted by
rlsublime
I currently have 3 checkboxes that I am trying to add a filter query to. I am using the current if statement below. It displays the result of the checkbox selected. It does not work when I try to select multiple boxes or all three boxes or box one and two etc. Is there a way to edit the following iif statement to be able to generate a query with multiple boxes selected. Thanks
IIf([Forms]![AdminReport]![chkbx_investor]=-1,"Investor",IIf([Forms]![AdminReport]![chkbx_mi]=-1,"MI",IIf([Forms]![AdminReport]![chkbx_makewhole]=-1,"Make Whole")))
What do you wnat returned if all three check boxes are checked? Or if only the first two are checked?
BTW, the correct syntax for the IIF() function for the above example is:
Code:
IIf([Forms]![AdminReport]![chkbx_investor]= TRUE,"Investor", IIf([Forms]![AdminReport]![chkbx_mi]= TRUE,"MI", IIf([Forms]![AdminReport]![chkbx_makewhole]=TRUE,"Make Whole","Nada")))
You are missing the part in RED.