I am trying to modify this SQL for a different database, the function being the same for grouping on Keywords, but wanting different data for the list that it's the rows source.
The Query:
The fields wanted:
Tried various guessed permutations but tied up in knots
The Query:
Code:
MySql = "SELECT A.* FROM MAIN A INNER JOIN " _
& "(SELECT M.ID1 FROM MAIN M INNER JOIN KEYWORD K ON M.ID1 = K.ID1" _
& " WHERE K.KeywordName IN (" & Mid(strList1, 2) & ")" _
& " GROUP BY M.ID1 HAVING Count(*)=" & Me!LIST3.ItemsSelected.Count _
& ") B ON A.ID1=B.ID1"
The fields wanted:
Code:
' MySql = "SELECT MAIN.ID1, MAIN.[Brief Issue Summary], MAIN.Status FROM MAIN;"
Tried various guessed permutations but tied up in knots