Hi there,
I have a form with 4 combo boxes, a free text field and a checkbox. All are unbound. A user can select what sort of records they want displayed by choosing options from the combo boxes. This I had working fine, until I came to add the checkbox.
I have since added a field called 'Closed' to the table. I'd like the query to pull records based on whether the checkbox is ticked or not. So:
Unchecked = Retrieve all records
Checked (default) = Retrieve only those records where the field (Closed) is unchecked.
Here is a list of the controls I have on the form:
cbo_casetype
cbo_legalaid
cbo_risk
cbo_cmp
txt_lawyer
I have tried opening the query in design view and entering various WHEREs and IIFs but I cannot for the life of me get it working. I have a feeling I need to add it into the SQL with the AND operator but the SQL has become so huge I have no idea where to start.
Very grateful for any help you can offer. This is driving me nuts.
Thanks very much
David
I have a form with 4 combo boxes, a free text field and a checkbox. All are unbound. A user can select what sort of records they want displayed by choosing options from the combo boxes. This I had working fine, until I came to add the checkbox.
I have since added a field called 'Closed' to the table. I'd like the query to pull records based on whether the checkbox is ticked or not. So:
Unchecked = Retrieve all records
Checked (default) = Retrieve only those records where the field (Closed) is unchecked.
Here is a list of the controls I have on the form:
cbo_casetype
cbo_legalaid
cbo_risk
cbo_cmp
txt_lawyer
I have tried opening the query in design view and entering various WHEREs and IIFs but I cannot for the life of me get it working. I have a feeling I need to add it into the SQL with the AND operator but the SQL has become so huge I have no idea where to start.
Very grateful for any help you can offer. This is driving me nuts.
Thanks very much
David