“组合框”的单一条件筛选功能代码可以实现,求如何用“复选组合框”实现多条件筛选功能的代码。
以下是“组合框”的单一条件筛选功能代码:
Dim Filter As String
With e.Form.Controls("bm")
If .Value IsNot Nothing Then
Filter = "部门 = '" & .Value & "'"
End If
End With
With e.Form.Controls("xl")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "最高学历 = '" & .Value & "'"
End If
End With
With e.Form.Controls("htxz")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "劳动合同性质 = '" & .Value & "'"
End If
End With
With e.Form.Controls("zc")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "职称 = '" & .Value & "'"
End If
End With
If Filter > "" Then
Tables("采购部在职人员数据库").Filter = Filter
End If
将以上代码如何修改?求“复选组合框”实现多条件筛选功能的代码。比如选2个条件“最高学历 or 劳动合同性质”筛选