I have a multiselect list box, containing words.
However my query is duplicating records where more than one words are identified in a record. I only want the record to appear once.
Code:
Dim strList1 As String, item As Variant
strList1 = ""
For Each item In Me.List3.ItemsSelected
strList1 = strList1 & Me.List3.ItemData(item) & ","
Next item
MySql = "SELECT MAIN.ID1, MAIN.QUESTION, JUNCTION1.KeywordID FROM MAIN INNER JOIN JUNCTION1 ON MAIN.ID1 = JUNCTION1.ID1"
MySql = MySql & " WHERE JUNCTION1.KeywordID IN (" & Mid(strList1, 1) & ")"