Hi I have a query where I pass it a value from a form. If the value on the form combo box is "All" then I don't want to restrict the query otherwise I want to restrict it to just the value selected in the form.

Below is the "Criteria" field that contains the code.

IIf(([forms]![frmDetail Reports Selection].[lstFilter]="All"),"*",[forms]![frmDetail Reports Selection].[lstFilter])

The problem is that when the user selects "All" in the combo box the query returns no results.

If however I change the "*" to an actual value in the field such as "W" then it works fine?

Can anybody please explain how I can get it to show all rows when the user selects "All" in the combo box.

Many thanks in advance.