7,759
社区成员
发帖
与我相关
我的任务
分享
Private Sub Form_Load()
Dim i As Integer
Call Connent '调用模块连接数据库
Combo1.Clear
Combo2.Clear
'把值检索出来赋值给combo1控件,
If Adodc2.Recordset.RecordCount > 0 Then (★★程序提示此行代码有误★★
提示内容为“对象变量或with块变量未设置”。)
Adodc2.Recordset.MoveFirst
For i = 0 To Adodc2.Recordset.RecordCount - 1
Combo1.AddItem Adodc2.Recordset.Fields(0).Value
Combo2.AddItem Adodc2.Recordset.Fields(1).Value
Adodc2.Recordset.MoveNext
Next
End If
Combo1.ListIndex = 0
Combo2.ListIndex = 0
End Sub
If not Adodc2.Recordset.RecordCount is nothing Then