I have a query (lossdata) where i want the user to be able to set the criteria for the results
so i have a table called 'chooser' which has one record of several combobox's which will display the same data as is in the respective columns in the query
if the user selects one of the options in the combo box then i want the query criteria for the respective column to be equal to that but if it is null then show all values in that column
so i thought the query criteria in the product column would be something like
like iif([chooser]![product]isnull,"*",[chooser]![product])
but it doesn't work so i tried
iif([chooser]![product] is null, like "*",like [chooser]![product])
but that does't work so i tried
iif([chooser]![product] is null,[lossdata]![product]like "*",[lossdata]![product]like[chooser]![product]
still doesn't work.
any help would be much appreciated as i thought i had finally got my head around access by doing this but it seems i haven't
so i have a table called 'chooser' which has one record of several combobox's which will display the same data as is in the respective columns in the query
if the user selects one of the options in the combo box then i want the query criteria for the respective column to be equal to that but if it is null then show all values in that column
so i thought the query criteria in the product column would be something like
like iif([chooser]![product]isnull,"*",[chooser]![product])
but it doesn't work so i tried
iif([chooser]![product] is null, like "*",like [chooser]![product])
but that does't work so i tried
iif([chooser]![product] is null,[lossdata]![product]like "*",[lossdata]![product]like[chooser]![product]
still doesn't work.
any help would be much appreciated as i thought i had finally got my head around access by doing this but it seems i haven't