Foxtable(狐表)用户栏目专家坐堂 → 多条件筛选的问题


  共有3682人关注过本帖平板打印复制链接

主题:多条件筛选的问题

帅哥哟,离线,有人找我吗?
HANZHIGANG
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:410 积分:4455 威望:0 精华:0 注册:2015/3/21 14:25:00
多条件筛选的问题  发帖心情 Post By: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编辑过]

 回到顶部