I don't know if that subject line describes it best, but I have a subform, continuous form, that selects text strings for a query. Basically it is a multiple choice situation: pick any number from a list. I get this list using a select distinct query. A text box accumulates these text strings: firstchoice, secondchoice, etc.
Then on the main form, I'd like to click a button and run a query, the criteria for one of whose fields would be all the accumulated text strings. I tried just referencing my text box, storing these strings, but I now see that won't work, i.e. I can't have a query field referencing a text box and giving it "firstchoice" or "secondchoice" or, etc. This looks OK to me, but it doesn't work and probably means I need to generate a new WHERE clause for each choice made in the subform.
Can someone point me to a generic solution, i.e. a dynamic WHERE clause generator for a query?
Thanks,
Tom
Then on the main form, I'd like to click a button and run a query, the criteria for one of whose fields would be all the accumulated text strings. I tried just referencing my text box, storing these strings, but I now see that won't work, i.e. I can't have a query field referencing a text box and giving it "firstchoice" or "secondchoice" or, etc. This looks OK to me, but it doesn't work and probably means I need to generate a new WHERE clause for each choice made in the subform.
Can someone point me to a generic solution, i.e. a dynamic WHERE clause generator for a query?
Thanks,
Tom