Foxtable(狐表)用户栏目专家坐堂 → [求助]条件表达式中的这种包含如何写


  共有2938人关注过本帖树形打印复制链接

主题:[求助]条件表达式中的这种包含如何写

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


加好友 发短信
等级:超级版主 帖子:110790 积分:563882 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/4/14 23:02:00 [显示全部帖子]

Dim s As String = "A,C"
Dim filter As String = "1=2 "
For Each s1 As String In s.split(",")
    filter = filter & " or ','+产品+',' like '%," & s1 & ",%' "
Next
Output.Show(filter)

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110790 积分:563882 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/4/15 8:29:00 [显示全部帖子]

Dim s As String = e.Form.Controls("CheckedComboBox_类别").Text
Dim filter As String = "1=2 "
If s = "全选" OrElse s = "" Then
filter = ""
else
filter = "1=2 "
For Each s1 As String In s.split(",")
    filter = filter & " or ','+类别+',' like '%," & s1 & ",%' "
Next
end if
Output.Show(filter)
[此贴子已经被作者于2020/4/15 8:29:07编辑过]

 回到顶部