这段为什么会出现时实错误91。
Private Sub DataList1_Click()
'查看操作员权限
Adodc2.RecordSource = "select * from 权限信息表 where 操作员姓名='" & Trim(DataList1.BoundText) & "'"
'On Error Resume Next
'Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
For i = 0 To 4
If Adodc2.Recordset.Fields(i) = 0 Then
Check1(i).Value = 1
Else
Check1(i).Value = 0
End If
Next i
Adodc2.Recordset.Update '更新记录
End If
End Sub
上面这段程序我编译是在Adodc2.Recordset.RecordCount > 0位置出错,:对象变量或with块变量未设置,这是怎么原因啊,以前也碰到过。各位达人指教!感激!!