Hello Everyone,
I have an access application that has a listbox on a form. The list box is set to multiselect. I want to be able to use the selected items in a parameterized query that is predefined in access. The reason for this is that I need to run a transfertext macro that uses the query as a table. I have put the selected items from the listbox into a control on the form. The where clause looks like 'BABY FOOD' Or 'AUTOMOTIVE' if you select those from the list. Then I take what is in the control [Form]![frmWhatever]![txtBox] which = 'Baby Food' Or 'Automotive' and use it as a parameter in a predefined query. So the where clause for the query looks like [Form]![frmWhatever]![txtBox] and the parameter I have set is the same. When I click the button the where clause is built and put into the textbox and then the string in the textbox is used as parameters for the query. This doesn't work. The transfertext function gives me an empty CSV file unless I only select ONE item at a time... Any Reason for this?