Question : Check Boxes as Query Criteria

I have a query "RunProfile" and a form "ProfileFilterForm" with a checkbox "Check1"

If the check box is check I need the Query Criteria to = NULL for one of the fields. What kind of like/if script do I need to put in the Query Criteria of the field?

Answer : Check Boxes as Query Criteria

lol!  That doesn't sound very close at all.  
-- switching to SQL view (right-click -> SQL View).
-- remove the semicolon at the end of the SQL text, and add the following WHERE Clause
-- Use NZ like Jim suggested to make comparisons where Null is involved.

WHERE Nz(YourFieldName,"") = IIF(Forms!ProfileFilterForm!Check1 = TRUE, "", YourFieldName)

I'm assuming that this is the only criteria in your query.  If you have an existing WHERE clause, add on to it like this:

WHERE SomeOtherCriteria AND Nz(YourFieldName,"") = IIF(Forms!ProfileFilterForm!Check1 = TRUE, "", YourFieldName)
Random Solutions  
 
programming4us programming4us