Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共8 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:如何提取某个表的列名到ComboBox1列表中

1楼
migold 发表于:2009/8/1 18:02:00

求助如题

2楼
yangming 发表于:2009/8/1 18:28:00
看13楼代码
http://www.foxtable.com/dispbbs.asp?boardid=2&id=3694&page=&star=2
这上面是表名,列名代码请看下贴
[此贴子已经被作者于2009-8-1 18:33:02编辑过]
3楼
yangming 发表于:2009/8/1 18:33:00
For Each cl As Col In CurrentTable.Cols
dim Tex As String
    Tex= Tex & "|" & cl.name
Dim com7 As WinForm.ComboBox = e.Form.Controls("ComboBox7")
com7.ComboList = Tex
Next
4楼
czy 发表于:2009/8/1 20:07:00
我也学一个

Dim s As String
For Each dc As DataCol In DataTables("表名").DataCols
    s = s & "|" & dc.name
    e.Form.Controls("ComboBox").ComboList = s
Next
5楼
migold 发表于:2009/8/2 9:33:00

图片点击可在新窗口打开查看谢谢,谢谢各位专家的解答

6楼
狐狸爸爸 发表于:2009/8/2 12:30:00
以下是引用czy在2009-8-1 20:07:00的发言:
我也学一个

Dim s As String
For Each dc As DataCol In DataTables("表名").DataCols
    s = s & "|" & dc.name
    e.Form.Controls("ComboBox").ComboList = s
Next


应该这样:

Dim s As String
For Each dc As DataCol In DataTables("表名").DataCols
    s = s & "|" & dc.name
Next
e.Form.Controls("ComboBox").ComboList = s

否则ComboBox被反复设置,影响效率。

7楼
czy 发表于:2009/8/2 12:33:00
以下是引用狐狸爸爸在2009-8-2 12:30:00的发言:


应该这样:

Dim s As String
For Each dc As DataCol In DataTables("表名").DataCols
    s = s & "|" & dc.name
Next
e.Form.Controls("ComboBox").ComboList = s

否则ComboBox被反复设置,影响效率。


收到,谢了!

8楼
hty4000 发表于:2009/8/2 14:40:00
了不起
共8 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 2 queries.