J
joyo
I am new to the ADODB, below is my code. It is pretty easy and simple
code, but I don't know why I just keep getting the error message.
Private Sub Form_Load()
Dim cnn As ADODB.Connection
Dim cust As ADODB.Recordset
Set cnn = CurrentProject.Connection
cust.Open "SELECT * FROM tbl_TmpTblInfor", cnn
Do Until cust.EOF
Debug.Print cust!TblName
cust.MoveNext
Loop
End Sub
The error message is
Runtime error 91,
object variable or with block variable not set.
Your help will be highly appreciated.
Thanks
joyo
code, but I don't know why I just keep getting the error message.
Private Sub Form_Load()
Dim cnn As ADODB.Connection
Dim cust As ADODB.Recordset
Set cnn = CurrentProject.Connection
cust.Open "SELECT * FROM tbl_TmpTblInfor", cnn
Do Until cust.EOF
Debug.Print cust!TblName
cust.MoveNext
Loop
End Sub
The error message is
Runtime error 91,
object variable or with block variable not set.
Your help will be highly appreciated.
Thanks
joyo