我参照那个写了如下代码,筛选不起作用啊
Dim Filter As String
With e.Form.Controls("ssjl")
If .Value IsNot Nothing Then
Filter = "教练姓名 = '" & .Value & "'"
End If
End With
With e.Form.Controls("kclx")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "私教类型 = '" & .Value & "'"
End If
End With
With e.Form.Controls("xydh")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "手机号码 = '" & .Value & "'"
End If
End With
With e.Form.Controls("xyxm")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "学员姓名 >= #" & .Value & "#"
End If
End With