Hello,
I have four radio buttons on a form that allows a user to select any combination of the 4. I have an unbound field "MREALL" that is holding the values of the four radio buttons. I am then trying to filter a query depending on the combination of radio buttons selected by the user.
I am able to build the query criteria where one radio button is selected but having difficulty where multiple buttons are selected.
My code is below. I suspect I need to add an "OR" or use "IN" in the "Then" part of the criteria.
Like IIf([Forms]![frm_Main_Menu]![MREALL]="-1-1-1-1","*") Or IIf([Forms]![frm_Main_Menu]![MREALL]="-1-1-1-1","None") Or IIf([Forms]![frm_Main_Menu]![MREALL]="000-1","None") Or IIf([Forms]![frm_Main_Menu]![MREALL]="0000","Empty") Or IIf([Forms]![frm_Main_Menu]![MREALL]="-1000","Strong") Or IIf([Forms]![frm_Main_Menu]![MREALL]="0-100","Adequate") Or IIf([Forms]![frm_Main_Menu]![MREALL]="00-10","Weak") Or [highlight #FCE94F]IIf([Forms]![frm_Main_Menu]![MREALL]="00-1-1",[highlight #FCE94F]In ("Weak","None"))[/highlight]
[/highlight]
Thanks for the help.
I have four radio buttons on a form that allows a user to select any combination of the 4. I have an unbound field "MREALL" that is holding the values of the four radio buttons. I am then trying to filter a query depending on the combination of radio buttons selected by the user.
I am able to build the query criteria where one radio button is selected but having difficulty where multiple buttons are selected.
My code is below. I suspect I need to add an "OR" or use "IN" in the "Then" part of the criteria.
Like IIf([Forms]![frm_Main_Menu]![MREALL]="-1-1-1-1","*") Or IIf([Forms]![frm_Main_Menu]![MREALL]="-1-1-1-1","None") Or IIf([Forms]![frm_Main_Menu]![MREALL]="000-1","None") Or IIf([Forms]![frm_Main_Menu]![MREALL]="0000","Empty") Or IIf([Forms]![frm_Main_Menu]![MREALL]="-1000","Strong") Or IIf([Forms]![frm_Main_Menu]![MREALL]="0-100","Adequate") Or IIf([Forms]![frm_Main_Menu]![MREALL]="00-10","Weak") Or [highlight #FCE94F]IIf([Forms]![frm_Main_Menu]![MREALL]="00-1-1",[highlight #FCE94F]In ("Weak","None"))[/highlight]
[/highlight]
Thanks for the help.