以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  怎么样获取当前表的某列给comb  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=90486)

--  作者:aidimeng
--  发布时间:2016/9/14 9:32:00
--  怎么样获取当前表的某列给comb

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20160914092922.png
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2016/9/14 9:39:00
--  
1、http://www.foxtable.com/webhelp/scr/0922.htm


--  作者:aidimeng
--  发布时间:2016/9/14 9:43:00
--  

cb.ComboList= DataTables("职员表").sqlGetComboListString("部门")
gz.ComboList= DataTables("职员表").SQLGetComboListString("职务","部门=\'"& cb.Value &"\'")

上面的代码我经常使用

 

 

您说的方法是从datatables中获取,我现在想从当前表中取值,该表可能还没保存,因此在datatable中可能还不存在值。我用的是外部表

[此贴子已经被作者于2016/9/14 9:47:07编辑过]

--  作者:有点蓝
--  发布时间:2016/9/14 9:49:00
--  
cb.ComboList= DataTables("职员表").GetComboListString("部门")
--  作者:aidimeng
--  发布时间:2016/9/14 9:57:00
--  

您说的这个我会用,我现在想实现的是  从 当前表中 来获取值,前提 这个表还没被保存,属于外部表

Dim wl As WinForm.ComboBox = e.Form.Controls("ComboBox3")
Dim bm As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim gz As WinForm.ComboBox = e.Form.Controls("ComboBox2")
wl.ComboList= DataTables("领料单明细").SQLGetComboListString("劳保名称","部门= \'"& bm.Value &"\'  and 职务 =\'"& gz.Value &"\'")

 

这样做 提取不到数值


--  作者:有点蓝
--  发布时间:2016/9/14 10:17:00
--  
唉,看清楚啊,用GetComboListString不是SQLGetComboListString