A
alanmorganjr via AccessMonster.com
I have a query that runs off of a table with a yes/no field called
[not_active]. I also have a form named [Comp_Report_Active_Criteria_frm] with
3 check boxes named [active], [inactive], and [both]. I would like it when:
- the [active] check box is checked the query only displays records where
the [not_active] box is unchecked.
- the [inactive] check box is checked the query only displays records where
the [not_active] box is checked.
- the [both] check box is checked the query displays all the records where
the [not_active] box is both checked and unchecked.
The formula I inserted in the query is as follows:
IIf([Forms]![Comp_Report_Active_Criteria_frm]![Active]=-1,0,IIf([Forms]!
[Comp_Report_Active_Criteria_frm]![Inactive]=-1,-1,IIf([Forms]!
[Comp_Report_Active_Criteria_frm]![Both]=-1,Null)))
The formula works great unless I check the [both] check box at which time the
query returns no records at all.
Any help on how to get this to work will be greatly appreciated.
Thanks,
Alan
[not_active]. I also have a form named [Comp_Report_Active_Criteria_frm] with
3 check boxes named [active], [inactive], and [both]. I would like it when:
- the [active] check box is checked the query only displays records where
the [not_active] box is unchecked.
- the [inactive] check box is checked the query only displays records where
the [not_active] box is checked.
- the [both] check box is checked the query displays all the records where
the [not_active] box is both checked and unchecked.
The formula I inserted in the query is as follows:
IIf([Forms]![Comp_Report_Active_Criteria_frm]![Active]=-1,0,IIf([Forms]!
[Comp_Report_Active_Criteria_frm]![Inactive]=-1,-1,IIf([Forms]!
[Comp_Report_Active_Criteria_frm]![Both]=-1,Null)))
The formula works great unless I check the [both] check box at which time the
query returns no records at all.
Any help on how to get this to work will be greatly appreciated.
Thanks,
Alan