以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]窗口组合框 求高手  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=68223)

--  作者:cjz7120641
--  发布时间:2015/5/12 17:13:00
--  [求助]窗口组合框 求高手
我想在我设计的窗口中加入两个组合框,第一个组合框显示的是表中列的标题,而第二个组合框中显示的是第一个组合框中标题列中的内容。现在问题是怎么提取表中标题的名称作为列表项目,在线等!
--  作者:大红袍
--  发布时间:2015/5/12 17:16:00
--  
Dim str As String = ""
For Each c As Col In Tables("表A").Cols
    str &= c.Name & "|"
Next
msgbox(str.Trim("|"))

--  作者:blsu33
--  发布时间:2015/5/12 17:17:00
--  
第二个
Tables("档案").Cols("二").ComboList =DataTables("档案").GetComboListString("二")
[此贴子已经被作者于2015/5/12 18:09:58编辑过]

--  作者:cjz7120641
--  发布时间:2015/5/12 17:26:00
--  
谢谢了
--  作者:cjz7120641
--  发布时间:2015/5/12 18:20:00
--  
Dim cmb As WinForm.ComboBox = e.Sender
Dim str As String = e.Form.Controls("ComboBox1").Value
cmb.ComboList = DataTables("销售明细").GetComboListString("ComboBox2", "?= \'" & str & "\'")

问下这个代码能实现上面那个功能吗?如果可以那个“?”该写什么才能实现上面的功能,不能的话第二个框内的代码应该怎么写?

--  作者:大红袍
--  发布时间:2015/5/12 19:21:00
--  
Dim cmb As WinForm.ComboBox = e.Sender
Dim str As String = e.Form.Controls("ComboBox1").Value
cmb.ComboList = DataTables("销售明细").GetComboListString(str)

--  作者:cjz7120641
--  发布时间:2015/5/12 23:23:00
--  

Dim st As String = e.Form.Controls("ComboBox1").Value
Dim str As String = e.Form.Controls("ComboBox2").Value
Dim dr As DataRow
dr = DataTables("销售明细").Find("st =  \' str \'")
If dr IsNot Nothing Then
    Dim wz As Integer = Tables("销售明细").FindRow( dr )
    If wz >= 0 Then
        Tables("销售明细").Position = wz
    End If
End If

这个代码中 红色的应该怎么写,或者怎么才能实现查找表内 第一个组全框的列中 第二个组合框的内容


--  作者:sloyy
--  发布时间:2015/5/13 2:21:00
--  
查找表内 第一个组全框的列中 第二个组合框的内容 

没看懂 什么意思?


--  作者:大红袍
--  发布时间:2015/5/13 9:31:00
--  
Dim st As String = e.Form.Controls("ComboBox1").Value
Dim str As String = e.Form.Controls("ComboBox2").Value
Dim dr As DataRow
dr = DataTables("销售明细").Find(st & " = \'" & str & "\'")