Dim Filter As String
With e.Form.Controls("xm")
If .Value IsNot Nothing Then
Filter = "姓名 Like '*" & .Value & "*'"
End If
End With
With e.Form.Controls("fz")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "分组 = '" & .Value & "'"
End If
End With
With e.Form.Controls("gzdw")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "工作单位 Like '*" & .Value & "*'"
End If
End With
With e.Form.Controls("yjfx")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "研究方向 Like '*" & .Value & "*'"
End If
End With
With e.Form.Controls("szss")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "所在省市 Like '*" & .Value & "*'"
End If
End With
With e.Form.Controls("fzr")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "负责人 Like '*" & .Value & "*'"
End If
End With
With e.Form.Controls("xyjf1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "现有积分 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("xyjf2")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "现有积分 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("hyyxq1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "会员有效期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("hyyxq2")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "会员有效期 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("zsyxq1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "证书有效期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("zsyxq2")
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