以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]窗口筛选 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=109432) |
-- 作者:hahahehe21 -- 发布时间:2017/11/11 20:55:00 -- [求助]窗口筛选 求助,如何设置根据输入的任意内容进行筛选,实例中只能从列表中选择内容进行筛选。 |
-- 作者:y2287958 -- 发布时间:2017/11/11 22:46:00 -- 俺这里测试咋都正常呢 |
-- 作者:hahahehe21 -- 发布时间:2017/11/12 11:35:00 -- 回复:(y2287958)俺这里测试咋都正常呢 如客户名称CS02,只输入02进行筛选是不行,只能输入完整的CS02,你再试试 |
-- 作者:y2287958 -- 发布时间:2017/11/12 12:44:00 -- 是想模样查找吗? |
-- 作者:y2287958 -- 发布时间:2017/11/12 12:49:00 -- Dim Filter As String With e.Form.Controls("cmbProduct") If .Value IsNot Nothing Then Filter = "产品 like \'%" & .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 & "客户 like \'%" & .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 & "雇员 like \'%" & .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 e.Form.Controls("rdoYifu").Checked = True \' 如果付款状态选择了"已付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "已付款 = True" End If If e.Form.Controls("rdoWeifu").Checked = True \' 如果付款状态选择了"未付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "已付款 = False Or 已付款 Is Null" End If If Filter > "" Then Tables("订单").Filter = Filter End If
|
-- 作者:hahahehe21 -- 发布时间:2017/11/12 14:44:00 -- 回复:(y2287958)Dim Filter As StringWith e.Form.... 测试好了,墙裂感谢!!! |