Hello All,
I’m having difficulty trying to get an IIf Statement to work. The user has the option of choosing “All” to return all values pick a specific value from a list of 8 values from a combo-box dropdown. The following code works fine.
However, I’d like to combine 3 values into one. For example, if I put “Request 1-2-3" as a value in the drop-down list, I’d like the query to return values for "Request 1","Request 2" and "Request 3".
I tried to write something like this, but it does not work:
Any/all help or suggestions would be GREATLY appreciated!
Thanks,
- Tom
I’m having difficulty trying to get an IIf Statement to work. The user has the option of choosing “All” to return all values pick a specific value from a list of 8 values from a combo-box dropdown. The following code works fine.
Code:
Like IIf([Forms]![frm_List]![ComboBox]="All","*",[Forms]![frm_List]![ComboBox]))
However, I’d like to combine 3 values into one. For example, if I put “Request 1-2-3" as a value in the drop-down list, I’d like the query to return values for "Request 1","Request 2" and "Request 3".
I tried to write something like this, but it does not work:
Code:
Like IIf([Forms]![frm_List]![ComboBox]="All","*",IIf([Forms]![frm_List]![ComboBox]="Request 1-2-3",("Request 1","Request 2","Request 3"),[Forms]![frm_List]![ComboBox]))
Any/all help or suggestions would be GREATLY appreciated!
Thanks,
- Tom