J
Joe S.
Currently I have a form that has some list boxes. One of the list boxes is a
multi-value multi-select and i'm having a bit of trouble getting it to work
with my strfilter.
Currently my code looks like this:
-------------------------------
Private Sub Command28_Click()
If Me.lstpayment.ItemsSelected.Count = 1 Then
strFilter = strFilter & "[payment_type] = '" & Me!lstpayment & "' And "
End If
If Me.lststore.ItemsSelected.Count = 1 Then
strFilter = strFilter & "[store_name] = '" & Me!lststore & "' And "
End If
If Me.lstkeyword.ItemsSelected.Count >= 1 Then
strFilter = strFilter & "[keywords] = '" & Me!lstkeyword & "'"
End If
DoCmd.OpenReport "rptnopic", acViewPreview, , strFilter
End Sub
--------------------------
The lstkeyword is the multi-value multi-select listbox. Every time i run
the filter, i get a error
"the multi-valued field '[keywords]" cannot be used in a WHERE or HAVING
caluse.
how can i modify my code to fix this error? Also, i can make it single
select if that will make it easier, but it needs to remain multi-value.
Any help would be appreciated.
If i remove the lstkeywords from the filter and run it based off the other 2
list boxes it works perfectly.
multi-value multi-select and i'm having a bit of trouble getting it to work
with my strfilter.
Currently my code looks like this:
-------------------------------
Private Sub Command28_Click()
If Me.lstpayment.ItemsSelected.Count = 1 Then
strFilter = strFilter & "[payment_type] = '" & Me!lstpayment & "' And "
End If
If Me.lststore.ItemsSelected.Count = 1 Then
strFilter = strFilter & "[store_name] = '" & Me!lststore & "' And "
End If
If Me.lstkeyword.ItemsSelected.Count >= 1 Then
strFilter = strFilter & "[keywords] = '" & Me!lstkeyword & "'"
End If
DoCmd.OpenReport "rptnopic", acViewPreview, , strFilter
End Sub
--------------------------
The lstkeyword is the multi-value multi-select listbox. Every time i run
the filter, i get a error
"the multi-valued field '[keywords]" cannot be used in a WHERE or HAVING
caluse.
how can i modify my code to fix this error? Also, i can make it single
select if that will make it easier, but it needs to remain multi-value.
Any help would be appreciated.
If i remove the lstkeywords from the filter and run it based off the other 2
list boxes it works perfectly.