[讨论]很急得问题
Private Sub Form_Load()
Adodc1.ConnectionString = ConnectString
Adodc1.RecordSource = "Select * From 合同表"
Dim i As Integer
For i = 1 To 7
Set txtField(i - 1).DataSource = Adodc1
txtField(i - 1).DataField = Adodc1.Recordset.Fields(i).Name
Next i
Set DataGrid1.DataSource = Adodc1
SetButtons True
End Sub
以上是我数据库连接代码,但有错误,问老师也没得到结果,希望大家帮我看看!谢谢!
txtField(i - 1).DataField = Adodc1.Recordset.Fields(i).Name
这处有错误,错误提示:在对应所需名称或序数的集合中,未找到项目.
着急啊,大家帮我出出主意,谢谢了!