I have a query with a column that is a Yes/No type. I'm trying to get the criteria set via a form variable such that it returns either "No" items, or All items both "Yes" and "No."
Please help!
Thanks!
I have a query with a column that is a Yes/No type. I'm trying to get the criteria set via a form variable such that it returns either "No" items, or All items both "Yes" and "No."
Please help!
Thanks!
what's your first attempt? post the sql
Not actually my first attempt, but the other have failed also. I derived this criteria approach from a post on another site.
SELECT SMDP_SOP_Query.[FOS notifies PDMO of completion], SMDP_SOP_Query.DocumentID, SMDP_SOP_Query.[PMO ADM log Subject or Title of Document], SMDP_SOP_Query.ID
FROM SMDP_SOP_Query
WHERE (((SMDP_SOP_Query.[FOS notifies PDMO of completion])=IIf([Forms]![SMDP_SOP_Form]![RecControl].[Value]=-1,-1,([SMDP_SOP_Query].[FOS notifies PDMO of completion])=0 Or ([SMDP_SOP_Query].[FOS notifies PDMO of completion])=-1)))
ORDER BY SMDP_SOP_Query.[FOS notifies PDMO of completion] DESC , SMDP_SOP_Query.DocumentID;
your where clause is incorrect. this one is correct:
SELECT SMDP_SOP_Query.[FOS notifies PDMO of completion], SMDP_SOP_Query.DocumentID, SMDP_SOP_Query.[PMO ADM log Subject or Title of Document], SMDP_SOP_Query.ID
FROM SMDP_SOP_Query
WHERE (((SMDP_SOP_Query.[FOS notifies PDMO of completion])=IIf([Forms]![SMDP_SOP_Form]![RecControl]=-1,-1,0)))
ORDER BY SMDP_SOP_Query.[FOS notifies PDMO of completion] DESC, SMDP_SOP_Query.DocumentID;