以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]筛选不准确,带盛字的无法显示 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=174981) |
|||||
-- 作者:hbkongxin -- 发布时间:2022/2/14 12:05:00 -- [求助]筛选不准确,带盛字的无法显示 Dim Filter As String With e.Form.Controls("业务员") If .text IsNot Nothing Then Filter = "业务员 like \'%" & .text & "%\'" End If End With With e.Form.Controls("客户") If .text IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "客户 like \'%" & .text & "%\'" End If End With With e.Form.Controls("花号") If .text IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "花号 like \'%" & .text & "%\'" End If End With With e.Form.Controls("面料") If .text IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "面料 like \'%" & .text.replace("*","[*]") & "%\'" End If End With With e.Form.Controls("调色员") If .text IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "调色员 like \'%" & .text & "%\'" End If End With With e.Form.Controls("打印机台") If .text IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "打印机台 like \'%" & .text & "%\'" End If End With With e.Form.Controls("开始") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "完成日期 >= #" & .Value & "#" End If End With With e.Form.Controls("结束") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "完成日期 <= #" & .Value & "#" End If End With If e.Form.Controls("已完成").Checked = True \' 如果付款状态选择了"已付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "完成 = True" End If If e.Form.Controls("未完成").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 这部分代码中,筛选带"盛"字的客户时会找不出来,如果我去掉 打印机台 那部分代码就能筛选出来
|
|||||
-- 作者:cd_tdh -- 发布时间:2022/2/14 12:37:00 -- 我的测试没问题呢,做个示例发出来测试看看
此主题相关图片如下:qq截图20220214123628.jpg [此贴子已经被作者于2022/2/14 12:40:55编辑过]
|
|||||
-- 作者:hbkongxin -- 发布时间:2022/2/14 12:52:00 -- 全都在里面,刚看了下,还有好几个没法显示 |
|||||
-- 作者:hbkongxin -- 发布时间:2022/2/14 12:54:00 --
|
|||||
-- 作者:cd_tdh -- 发布时间:2022/2/14 13:33:00 --
|
|||||
-- 作者:有点蓝 -- 发布时间:2022/2/14 13:48:00 -- .Value才使用IsNot Nothing判断 If .Value IsNot Nothing Then 如果是text,应该这样判断 If .text > "" Then |
|||||
-- 作者:hbkongxin -- 发布时间:2022/2/14 14:20:00 -- 感谢 |