Access Query with Iif
Posted on 2014-12-13
Hi. I have a user form for folks to run some data-defined reports. It has a checkbox, asking if they also want to filter by contactID. (Number) If checked, then they can choose the contact from a list, and the contacts ID is placed in a field called "MyContact". If the FilterByContact is NOT checked, however, I would like the query to show ALL contacts just filter on the dates. But the contact criteria is not working and I don't know how to tell it to show ALL contacts when the box is NOT checked. Any help appreciate.
Here is the Query Criteria I have in the ContactID field:
It all works fine except when needing to show ALL.