On a form (Form2) I want to select multiple items in an extended list box (List0) and send these selections to a text box (Text2) to be used as criteria for a query(Query).
I am a beginner and have managed to create the List Box, text box and get the query to work if there is only one selection. If I make multiple selections I get no results. (I am using this method as I plan to have more than 1 multiselect listbox on the form).
I have used the following in the List Box After Update field:
Private Sub List0_AfterUpdate()
Dim varItm As Variant
Me.Text2 = ""
For Each varItm In List0.ItemsSelected
Me.Text2 = Me.Text2 & " Or " & List0.ItemData(varItm)
Me.Text2 = Mid(Me.Text2, 5)
I have placed the following in the relevant query criteria:
What am I doing wrong??? (Please excuse my ignorance).
Thank you in advanced from a desperate and frustrated individual.