怎样表中的字段增加到combo中。
怎样才能在窗体载入的时候把表中的字段增加到combo中。
Dim rs As New ADODB.Recordset
Dim i As Integer
rs.Open "select * from 成品档案", CNT, adOpenKeyset, adLockPessimistic
For i = 0 To rs.Fields.Count - 1
Combo2.AddItem rs.Fields.Item(i).Name
Next
将 成品档案中的字段加载到控件中,怎么不行呢,代码哪有错,请指教
[解决办法]
rs.Open "select * from 成品档案", CNT, adOpenKeyset, adLockPessimisticcmbo2.clearFor i = 0 To rs.Fields.Count - 1 Combo2.AddItem rs!字段名 &"" rs.movenextNext i