Hi All,
I am creating a database for one of my colleagues and he has asked me to make a query that has a drop down menu and takes into account that the checkboxes on the form have been ticked.
I have made a form for this task which has an unbound combo box and 2 command buttons. When I click the OK command button it will open the query using the selection I have made from the drop down.
I have made queries like this before but now I need to tell the query to show me the same information with my 3 checkboxes ticked.
When I run my form, make my selection and click OK the query shows me nothing. I know that there are records with this criteria as I have looked throught the table and noted at least 8.
I have posted a copy of my SQL statement below. (Hope it helps).
Thanks in Advance,
/Sandy
I am creating a database for one of my colleagues and he has asked me to make a query that has a drop down menu and takes into account that the checkboxes on the form have been ticked.
I have made a form for this task which has an unbound combo box and 2 command buttons. When I click the OK command button it will open the query using the selection I have made from the drop down.
I have made queries like this before but now I need to tell the query to show me the same information with my 3 checkboxes ticked.
When I run my form, make my selection and click OK the query shows me nothing. I know that there are records with this criteria as I have looked throught the table and noted at least 8.
I have posted a copy of my SQL statement below. (Hope it helps).
Code:
SELECT [Problem Reporting Table].[Problem Number], [Problem Reporting Table].[IFA 1 - Who?], [Problem Reporting Table].[IFA 1 - Completed?], [Problem Reporting Table].[IFA 2 - Who?], [Problem Reporting Table].[IFA 2 - Completed?], [Problem Reporting Table].[IFA 3 - Who?], [Problem Reporting Table].[IFA 3 - Completed?], [Problem Reporting Table].[PRA 1 - Who?], [Problem Reporting Table].[PRA 1 - Completed?], [Problem Reporting Table].[PRA 2 - Who?], [Problem Reporting Table].[PRA 2 - Completed?], [Problem Reporting Table].[PRA 3 - Who?], [Problem Reporting Table].[PRA 3 - Completed?] FROM [Problem Reporting Table] WHERE ((([Problem Reporting Table].[IFA 1 - Who?])=[Forms]![frmOAOperator]![cboOperator]) AND (([Problem Reporting Table].[IFA 1 - Completed?]) Like "0")) OR ((([Problem Reporting Table].[IFA 2 - Who?])=[Forms]![frmOAOperator]![cboOperator]) AND (([Problem Reporting Table].[IFA 2 - Completed?]) Like "0")) OR ((([Problem Reporting Table].[IFA 3 - Who?])=[Forms]![frmOAOperator]![cboOperator]) AND (([Problem Reporting Table].[IFA 3 - Completed?]) Like "0")) OR ((([Problem Reporting Table].[PRA 1 - Who?])=[Forms]![frmOAOperator]![cboOperator]) AND (([Problem Reporting Table].[PRA 1 - Completed?]) Like "0")) OR ((([Problem Reporting Table].[PRA 2 - Who?])=[Forms]![frmOAOperator]![cboOperator]) AND (([Problem Reporting Table].[PRA 2 - Completed?]) Like "0")) OR ((([Problem Reporting Table].[PRA 3 - Who?])=[Forms]![frmOAOperator]![cboOperator]) AND (([Problem Reporting Table].[PRA 3 - Completed?]) Like "0")) ORDER BY [Problem Reporting Table].[Problem Number];
/Sandy
Comment