Dim Filter As String
With e.Form.Controls("县市区")
If .Value IsNot Nothing Then
Filter = "县市区 = '" & .Value & "'"
End If
End With
With e.Form.Controls("乡镇办")
If .Value IsNot Nothing Then
Filter = "乡镇办 = '" & .Value & "'"
End If
End With
With e.Form.Controls("现任职务")
If .Value IsNot Nothing Then
Filter = "现任职务 = '" & .Value & "'"
End If
End With
With e.Form.Controls("文化程度")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "文化程度 = '" & .Value & "'"
End If
End With
With e.Form.Controls("政治面貌")
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