Dim fil As String
Dim f1 As String
f1 = e.Form.Controls("条件一").Value
If f1>"" Then
fil="单位名称 Like " & "'%" & fil & "%'"
End If
f1 = e.Form.Controls("条件二").Value
If f1>"" Then
fil=fil & "and 单位名称 Like " & "'%" & fil & "%'"
End If
f1 = e.Form.Controls("跟进人").Value
If f1>"" Then
fil=fil & "and 跟进人 Like " & "'%" & fil & "%'"
End If
f1 = e.Form.Controls("分级").Value
If f1>"" Then
fil=fil & "and 分级 Like " & "'%" & fil & "%'"
End If
f1 = e.Form.Controls("状态").Value
If f1>"" Then
fil=fil & "and 状态 Like " & "'%" & fil & "%'"
End If
f1 = e.Form.Controls("行业").Value
If f1>"" Then
fil=fil & "and 行业 Like " & "'%" & fil & "%'"
End If
Tables("客户").filter=fil