以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 多条件筛选的问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=129923) |
||||
-- 作者:HANZHIGANG -- 发布时间:2019/1/8 21:20:00 -- 多条件筛选的问题 因为有的列是含空值,导致筛选按钮不能模糊筛选出内容,怎么处理 此主题相关图片如下:qq截图20190108211516.png 代码如下
Dim bsc As WinForm.ComboBox = e.Form.Controls("办事处") Dim sykh As WinForm.ComboBox = e.Form.Controls("上游客户") Dim ysdt As WinForm.TextBox = e.Form.Controls("运输动态") Dim rwdh As WinForm.TextBox = e.Form.Controls("任务单号") Dim ysdh As WinForm.TextBox = e.Form.Controls("运输单号") Dim vinm As WinForm.TextBox = e.Form.Controls("VIN码") Dim pp As WinForm.TextBox = e.Form.Controls("品牌") Dim spc As WinForm.TextBox = e.Form.Controls("商品车") Dim kssj As WinForm.DateTimePicker = e.Form.Controls("开始") Dim zzsj As WinForm.DateTimePicker = e.Form.Controls("终止")
If kssj.Value IsNot Nothing And zzsj.Value IsNot Nothing Then Tables("信息总表").Filter = "办事处 like \'*" & bsc.Value & "*\' and 上游客户 like \'*" & sykh.Value & "*\' and 运输动态 like \'*" & ysdt.Text & "*\'and 任务单号 Like \'*" & rwdh.Text & "*\'and 运输单号 Like \'*" & ysdh.Text & "*\'and VIN码 like \'*" & vinm.Text & "*\' and 品牌 like \'*" & pp.Text & "*\'and 商品车 like \'*" & spc.Text & "*\' and 计划下达时间 >= #" & kssj.Value & "# and 计划下达时间 <= #" & zzsj.Value & "#" else Tables("信息总表").Filter = "办事处 like \'*" & bsc.Value & "*\' and 上游客户 like \'*" & sykh.Value & "*\' and 运输动态 like \'*" & ysdt.Text & "*\'and 任务单号 Like \'*" & rwdh.Text & "*\'and 运输单号 Like \'*" & ysdh.Text & "*\'and VIN码 like \'*" & vinm.Text & "*\' and 品牌 like \'*" & pp.Text & "*\'and 商品车 like \'*" & spc.Text & "*\'" end if [此贴子已经被作者于2019/1/8 21:24:58编辑过]
|
||||
-- 作者:HANZHIGANG -- 发布时间:2019/1/8 21:23:00 -- Dim bsc As WinForm.ComboBox = e.Form.Controls("办事处") Dim sykh As WinForm.ComboBox = e.Form.Controls("上游客户") Dim ysdt As WinForm.TextBox = e.Form.Controls("运输动态") Dim rwdh As WinForm.TextBox = e.Form.Controls("任务单号") Dim ysdh As WinForm.TextBox = e.Form.Controls("运输单号") Dim vinm As WinForm.TextBox = e.Form.Controls("VIN码") Dim pp As WinForm.TextBox = e.Form.Controls("品牌") Dim spc As WinForm.TextBox = e.Form.Controls("商品车") Dim kssj As WinForm.DateTimePicker = e.Form.Controls("开始") Dim zzsj As WinForm.DateTimePicker = e.Form.Controls("终止")
If kssj.Value IsNot Nothing And zzsj.Value IsNot Nothing Then Tables("信息总表").Filter = "办事处 like \'*" & bsc.Value & "*\' and 上游客户 like \'*" & sykh.Value & "*\' and 运输动态 like \'*" & ysdt.Text & "*\'and 任务单号 Like \'*" & rwdh.Text & "*\'and 运输单号 Like \'*" & ysdh.Text & "*\'and VIN码 like \'*" & vinm.Text & "*\' and 品牌 like \'*" & pp.Text & "*\'and 商品车 like \'*" & spc.Text & "*\' and 计划下达时间 >= #" & kssj.Value & "# and 计划下达时间 <= #" & zzsj.Value & "#" else Tables("信息总表").Filter = "办事处 like \'*" & bsc.Value & "*\' and 上游客户 like \'*" & sykh.Value & "*\' and 运输动态 like \'*" & ysdt.Text & "*\'and 任务单号 Like \'*" & rwdh.Text & "*\'and 运输单号 Like \'*" & ysdh.Text & "*\'and VIN码 like \'*" & vinm.Text & "*\' and 品牌 like \'*" & pp.Text & "*\'and 商品车 like \'*" & spc.Text & "*\'" end if |
||||
-- 作者:有点蓝 -- 发布时间:2019/1/8 22:52:00 -- 按照这种方式设置条件:http://www.foxtable.com/webhelp/scr/1058.htm |
||||
-- 作者:HANZHIGANG -- 发布时间:2019/1/9 18:55:00 -- 明白了,谢了 [此贴子已经被作者于2019/1/9 19:31:07编辑过]
|
||||
-- 作者:HANZHIGANG -- 发布时间:2019/1/18 21:33:00 -- 车辆选定窗口的绑定的表如果设为副本,则在调度窗口增加车号弹出此窗口时,可进行选定(代码被删了)但不能进行查询, 如果没设为副本,可以查询,但在选定时又提示找不到相应的表。 怎么解决?请蓝版指教
|
||||
-- 作者:有点蓝 -- 发布时间:2019/1/18 21:45:00 -- 仔细看看:http://www.foxtable.com/webhelp/scr/1906.htm 车辆选定窗口的绑定的表设为副本,查询按钮 …… If Filter > "" Then Tables("车号选定窗口_Table1").Filter = Filter Else Tables("车号选定窗口_Table1").Filter = "" End If |
||||
-- 作者:HANZHIGANG -- 发布时间:2019/1/19 11:33:00 -- 一下子豁然了,当时也看了这部分帮助,没理解,你一提醒马上想明白了 谢蓝版
|