以下代码是窗口的一段代码,目的是想实现多选择筛选,使用comboBox1一次只能筛选一个公司数据,目前想实现筛选多个公司数据,编写了以下代码,标黄色颜色的出现了错误了,该怎么改进,如何才能实现目的。
Case "checkedcomboBox1"
Dim txt As String = e.Form.Controls("checkedcomboBox1").Text
If txt = "" Then
tbl.DataTable.loadFilter = ""
tbl.DataTable.load()
Else
Dim lis() As String =txt.Split(",")
Dim filter As String
For Each li As String In lis
filter = "公司名称 Like " & "'%" & li & "%'" Or
Next
'txt = "'%" & txt & "%'"
'tbl.DataTable.loadFilter = "公司名称 Like " & txt
tbl.DataTable.loadFilter =filter
tbl.DataTable.load()
End If