以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  窗口中的表,定义成副表后,一下代码不能用了!!  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=50779)

--  作者:wealthwind
--  发布时间:2014/5/13 15:10:00
--  窗口中的表,定义成副表后,一下代码不能用了!!
Dim names As new List (of String)
For Each c As Col In Tables("个案申请").Cols \'遍历主表所有列
    If c.DataCol.IsString Then \'当主表列为字符列时,将列名作为names的元素
            names.add(c.name)
        End If
Next
\'将names的元素用"|"分割为字符串作为条件筛选的下拉列表
Dim lb As String
Dim t As Integer
For t = 0 To names.Count-1
    If t=0 Then
        lb=names(t)
    Else
        lb=lb & "|" & names(t)
    End If
Next
Dim cxtj As WinForm.ComboBox = e.Form.Controls("查询条件")
cxtj.ComboList = lb & "|全部" \'将全部加入下拉列表

图片点击可在新窗口打开查看此主题相关图片如下:360截图20140513150948312.jpg
图片点击可在新窗口打开查看

--  作者:wealthwind
--  发布时间:2014/5/13 15:12:00
--  
已解决,在TEXTCHANG里面改,即可~