I am building a search page to find records based on some criteria selected on a form. I have been pretty successful with this. However, I am stuck on using check boxes as part of the filter.
I am building a SQL statement and running it against a query. My query has check box fields (Yes/No) for states. My search form has unbound check boxes representing the states. For example if I check the check box called CheckCT on my search form I want it to filter out all records that have CT in the query checked or set to Yes. Here is what I currently have for my WHERE section of the SQL statement:
strWhere = strWhere & " qryBidders.CT = Me.CheckCT "
When run it prompts a "Enter parameter value" pop up dialog. If I use:
strWhere = strWhere & " qryBidders.CT = Yes " it works but it defeats the purpose of the check box on my search form.
I know I am probably missing something stupid but any help is greatly appreciated!
Thanks
I am building a SQL statement and running it against a query. My query has check box fields (Yes/No) for states. My search form has unbound check boxes representing the states. For example if I check the check box called CheckCT on my search form I want it to filter out all records that have CT in the query checked or set to Yes. Here is what I currently have for my WHERE section of the SQL statement:
strWhere = strWhere & " qryBidders.CT = Me.CheckCT "
When run it prompts a "Enter parameter value" pop up dialog. If I use:
strWhere = strWhere & " qryBidders.CT = Yes " it works but it defeats the purpose of the check box on my search form.
I know I am probably missing something stupid but any help is greatly appreciated!
Thanks