G
Guest
I know that the wildcard Like "*" returns all value. But I am having trouble
referencing it in the criteria of a query. I have a form with listboxes. When
the user selects a value in a listbox it places the value in a field on the
form. If the user does not make a selection in that a particular listbox the
vale defaults to the string "All". I then have the following in the criteria
of the query.
IIf([Forms]![fMainReporting]![selectDept]="All",Like
"*",[Forms]![fMainReporting]![selectDept])
I have written the syntax for the wildcard everyway I can think of; nothing
works. If there is a Dept value in [selectDept] the queries display data
fine; if the value in [selectDept] is "All" nothing is returned. It should
return all records.
Any help would be greatly appreciate.
referencing it in the criteria of a query. I have a form with listboxes. When
the user selects a value in a listbox it places the value in a field on the
form. If the user does not make a selection in that a particular listbox the
vale defaults to the string "All". I then have the following in the criteria
of the query.
IIf([Forms]![fMainReporting]![selectDept]="All",Like
"*",[Forms]![fMainReporting]![selectDept])
I have written the syntax for the wildcard everyway I can think of; nothing
works. If there is a Dept value in [selectDept] the queries display data
fine; if the value in [selectDept] is "All" nothing is returned. It should
return all records.
Any help would be greatly appreciate.