如何把数据库的某字段的记录插到listbox这个列表框控件
RTRTRTRT
.....
1.绑定
2.循环Fetch,AddItem
我是一个一个记录的插的。自己想出来的哈哈
Private Sub Form_Load()
Dim vv as NEW ADODB.Recordset
Dim a As String
Dim i As Integer
a = "select usename from [kkk] where gl_leixing='kong'"
Set vv = chaxun(a) 'chaxun()定义在模块内的函数
uq = vv.RecordCount
For i = 0 To (uq - 1)
List1.AddItem vv("usename")
vv.MoveNext
If vv.EOF Then
vv.MoveLast
End If
Next i
End Sub