下面一段代码是复选组合框进行组合筛选时,对所选项进行的精确筛选,我想修改一个,只要包含所选项字符,进行筛选。如:选项中有,会计,在“专业类”列中,即有会计,也有会计学,把包含会计的,全部筛选出来,这里如何修改?谢谢老师
With e.Form.Controls("CheckedComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & " 专业类 in ('" & .Value.replace(",", "','") & "')"
End If
End With
With e.Form.Controls("CheckedComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "(专业类 like '%" & .Value.replace(",", "%' or 专业类 like '%") & "%')"
End If
End With