以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]窗口表的combobox筛选代码  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=102263)

--  作者:sexbee
--  发布时间:2017/6/16 12:54:00
--  [求助]窗口表的combobox筛选代码

组合框值用于筛选

 

 

Dim dt As Table = e.Form.controls("Tableblitem").Table
Dim H As String = e.Form.controls("combobox").value
Dim Filter As String
Select Case  H

    Case "张三"
        Filter = "H1"
    Case "李四"
        Filter = "H2" And "H3" And "H4"

    Case "王五"
        Filter = "H5"
End Select
Filter = "code=\'" & e.Row("code") & "\' And pcode=\'"& e.Row("pcode") & "\'And ptype= Filter"
e.form.controls("Tablelablist").Table.Filter  = Filter

 

 

报错:row不是eventargs成员。。。


--  作者:有点色
--  发布时间:2017/6/16 15:35:00
--  

Dim dt As Table = e.Form.controls("Tableblitem").Table
Dim H As String = e.Form.controls("combobox").value
Dim Filter As String
Select Case  H

    Case "张三"
        Filter = "\'H1\'"
    Case "李四"
        Filter = "\'
H2\',\'H3\',\'H4\'"

    Case "王五"
        Filter = "\'H5\'"
End Select

e.form.controls("Tablelablist").Table.Filter = "ptype in (" & filter & ")"

 


--  作者:sexbee
--  发布时间:2017/6/16 16:55:00
--  

还有几个条件,可以这么加吗?

e.form.controls("Tablelablist").Table.Filter  = "ptype in (" & filter & ")" and "lcode=\'" & e.Row("lcode") & "\' and  "pvcode=\'"& e.Row("pvcode") & "\'"


--  作者:有点色
--  发布时间:2017/6/16 18:19:00
--  
 条件从哪里取值?做实例上来看看。