In addition to what Paul posted, you are also not constructing the where clause properly.
It should be more along the lines of:
Code:
strIN = "("
For i = 0 To ListBoxActions1.ListCount - 1
If ListBoxActions1.Selected(i) Then
If ListBoxActions1.Column(0, i) = "All" Then
flgSelectAll = True
End If
strIN = strIN & "[Category] ='" & ListBoxActions1.Column(0, i) & "' OR "
End If
Next i
strIN = Left(strIN, Len(strIN) - 4) & ")"
strWhere = " WHERE " & strIN
Also, why create a query object? Just run the SQL
Code:
CurrentDb.Execute strSQL, dbFailOnError