using IN from a form text box

spinkung

Registered User.
Local time
Today, 23:11
Joined
Dec 4, 2006
Messages
267
Hi

i've put the values of a multi-select list box in a text box. i now want to use those values to filter another query (use for another list box)

a typical value is : "INDEP", "NATIONAL" (i've added the quotes in the code)

i then put this into my query : In ([Forms]![frm_selections]![txt_company])

put i keep getting 0 results? is there something wrong with the way i have the criteria?

Thanks



** EDIT. I've also tried : INDEP, National (without quotes) which brought back nothing. But if i just use one option (i.e. INDEP) then it works.
 
I believe it is because you use double-quotes("), in Queries to compare String you use single-quotes (').. Try changing that.. Hopefully you wil get it right..
 
No. You cannot pass SQL language elements to a query. "," in the list are language elements.

You need to a). construct the entire query in code, or b). use QueryDEf to extract and modify the SQL of an existing query.
 

Users who are viewing this thread

Back
Top Bottom