[求助]再问窗口筛选_可否实现输入的多条件都实现模糊筛选? Post By:2010/4/27 21:13:00 [只看该作者]
Dim Filter As String With e.Form.Controls("cmbProduct") If .Value IsNot Nothing Then Filter = "产品 = '" & .Value & "'" End If End With With e.Form.Controls("cmbCustomer") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "客户 = '" & .Value & "'" End If End With With e.Form.Controls("cmbEmployee") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "雇员 = '" & .Value & "'" End If End With With e.Form.Controls("StartDate") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "日期 >= #" & .Value & "#" End If End With With e.Form.Controls("EndDate") 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 --------------- 以上代码是帮助中的‘窗口筛选’例表中的代码,但这个是完全条件的筛选,可否改成组合框输入条件后,自动变成“包含”式筛选呢?搜了一下咱们论坛的“模糊筛选”没太懂,能不能哪位老师教一下?谢谢了。