以文本方式查看主题

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

--  作者:江南小镇
--  发布时间:2017/12/23 14:40:00
--  [求助]组合框

老师好,组合框5如果在组合框2中得不到数据信息希望能在组合框1中获取数据信息.

 


图片点击可在新窗口打开查看此主题相关图片如下:2017-12-23 14 35 49.png
图片点击可在新窗口打开查看


--  作者:有点蓝
--  发布时间:2017/12/23 14:46:00
--  
代码贴出来,文字,不要截图
--  作者:江南小镇
--  发布时间:2017/12/23 15:19:00
--  
老师好:


e.Form.Controls("ComboBox1").ComboList = bms.GetComboListString("窗口归类")
上面是窗口AfterLoad事件代码

Dim cmb As WinForm.ComboBox = e.Sender
Dim str As String = e.Form.Controls("ComboBox1").Value
cmb.ComboList = bms.GetComboListString("窗口名", "窗口归类 = \'" & str & "\'")
上面是组合框2Enter事件代码

Dim cmb As WinForm.ComboBox = e.Sender
Dim str As String = e.Form.Controls("ComboBox2").Value
cmb.ComboList = bms.GetComboListString("窗口名1", "窗口名 = \'" & str & "\'")

如果组合框2没有数据就在组合框1中获取数据信息。




--  作者:有点蓝
--  发布时间:2017/12/23 15:38:00
--  
Dim cmb As WinForm.ComboBox = e.Sender
Dim str As String = e.Form.Controls("ComboBox2").Text
if str > "" then
    str = "窗口名 = \'" & str & "\'"
else
    str =  "窗口归类 = \'" & e.Form.Controls("ComboBox1").Text & "\'"
endif
cmb.ComboList = bms.GetComboListString("窗口名1", str)