Vb中用ADO控件连接了一个数据库, Adodc1.Recordset.MoveFirst 报错,对象变量或with变量未设置,怎么回事
PrivateSubForm_Load()Text1.Locked=True'''''''''''''''''''''''''''''''''''''''''''''''...
Private Sub Form_Load()
Text1.Locked = True
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim nod As Node
Set nod = TreeView1.Nodes.Add(, , "Father", , 1)
Adodc1.Recordset.MoveFirst
For i = 0 To Adodc1.Recordset.RecordCount - 1
Set nod = TreeView1.Nodes.Add("Father", tvwchlid, , Adodc1.Recordset.Fields("sele_no"), 2)
Adodc1.Recordset.MoveNext
TreeView1.Refresh
Next i
End Sub 展开
Text1.Locked = True
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim nod As Node
Set nod = TreeView1.Nodes.Add(, , "Father", , 1)
Adodc1.Recordset.MoveFirst
For i = 0 To Adodc1.Recordset.RecordCount - 1
Set nod = TreeView1.Nodes.Add("Father", tvwchlid, , Adodc1.Recordset.Fields("sele_no"), 2)
Adodc1.Recordset.MoveNext
TreeView1.Refresh
Next i
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询