如何把表的所有字段名加入到某comlist控件中?
正解:在comlist控件的enter事件中加入如下代码
方法一:
For Each c As DataCol In DataTables("表名").datacols If e.sender.items.contains(c.name) = False Then e.sender.items.add(c.name) End IfNext
方法二:
Dim str As String For Each c As col In Tables("表A").cols str = Str & "|" & c.Name Next e.Sender.Combolist = str