Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box to filter records 1

Status
Not open for further replies.

twomblml

IS-IT--Management
Apr 17, 2001
42
US
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
 
And this ?
strWhere = strWhere & " qryBidders.CT = " & Me.CheckCT

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top