Access Form - Filter a query for a Form List to include or exclude items based upon a checkbox value
Posted on 2011-05-05
I have an Access Form that has a list based upon a query that the user will select a job from a list. I am trying to filter that list to either include or exclude jobs that are "Closed" based upon the user's preference.
The Form is named
The checkbox is named:
The user checks that box to Include the "Closed" jobs or leaves it blank to Exclude them.
My query is as follows:
SELECT tblQBCustomer.REFNUM, tblQBCustomer.NAME, tblQBCustomer.[Active Status T/F]
WHERE (((tblQBCustomer.[Active Status T/F])=0 Or (tblQBCustomer.[Active Status T/F])=[Forms]![frmJCJobStatusCurrent]![ckbxIncludeClosedJobs]));
Trouble is it either Includes Only the Closed Jobs or All Jobs. I want it to include only OPEN jobs when blank or all jobs when checked. It's working backwards. I've tried changing the 0 to -1 but that doesn't work either.