F
Fundays
Guest
Hi,
I have 2 list boxes on my form. List1 has 7 values (which are the field names of a table) and what ever values the user selects, goes into list2. Now when I click the ShowQuery Button, I want to build a dynamic query using all the field names in list2. Meaning, the user does not have to SELECT anything from list2. The query has to be built dynamically, taking all the values from List2.
How do I use ALL the values in a list box without "selecting" any of them???
List2.ItemsSelected doesn't work because I'm not "selecting" anything from the list box.
List2.ItemData doesn't work either because the List2's Row Source Type is Value list. (If it is set to field list then I cannot transfer the selected items from List1 using List2.addItem)
---Hope I haven't confused you! But hope someone can help me with this asap!
I have 2 list boxes on my form. List1 has 7 values (which are the field names of a table) and what ever values the user selects, goes into list2. Now when I click the ShowQuery Button, I want to build a dynamic query using all the field names in list2. Meaning, the user does not have to SELECT anything from list2. The query has to be built dynamically, taking all the values from List2.
How do I use ALL the values in a list box without "selecting" any of them???
List2.ItemsSelected doesn't work because I'm not "selecting" anything from the list box.
List2.ItemData doesn't work either because the List2's Row Source Type is Value list. (If it is set to field list then I cannot transfer the selected items from List1 using List2.addItem)
---Hope I haven't confused you! But hope someone can help me with this asap!