I am trying to use the wildcard in a query and failing miserably.
I have two combo boxes on a form. One contains the months, and the other the department.
I want to make it so that you select the month from the combo box, and if the second combo box is left blank, all records(for that month) are returned. If the second combo box is used, then the query will also filter for that department and the date selected.
The first one is working fine, here is what I am using for the second with no success:
in the criteria:
=iif(isnull([forms]![ReportingFrm]![combo2]),Like "*",[forms]![ReportingFrm]![combo2])
No records are returned. I have also tried using "*" as a default value, entering * into a table ect with no success.
Suggestions?
I have two combo boxes on a form. One contains the months, and the other the department.
I want to make it so that you select the month from the combo box, and if the second combo box is left blank, all records(for that month) are returned. If the second combo box is used, then the query will also filter for that department and the date selected.
The first one is working fine, here is what I am using for the second with no success:
in the criteria:
=iif(isnull([forms]![ReportingFrm]![combo2]),Like "*",[forms]![ReportingFrm]![combo2])
No records are returned. I have also tried using "*" as a default value, entering * into a table ect with no success.
Suggestions?
Last edited: