L
Leo
Help: I am just starting at a new company, and am having issues getting
Access to perform ADO.recordset operations correctly. And, there is no
"go-to" person here. I am just trying to use automation to make my life
easier. The code below returns an empty recordset ("-1" on the message box
which I added as a test). It finishes with an error message
I assume that I am just missing a library. I do have the MS ADO 2.8 and VBA
libraries selected in references. My version is Access 2003.
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
With rs
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenDynamic
.LockType = adLockPessimistic
.Open "SELECT * FROM tblNorthstar;"
End With
MsgBox rs.RecordCount
rs.close
Set rs = Nothing
Access to perform ADO.recordset operations correctly. And, there is no
"go-to" person here. I am just trying to use automation to make my life
easier. The code below returns an empty recordset ("-1" on the message box
which I added as a test). It finishes with an error message
I assume that I am just missing a library. I do have the MS ADO 2.8 and VBA
libraries selected in references. My version is Access 2003.
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
With rs
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenDynamic
.LockType = adLockPessimistic
.Open "SELECT * FROM tblNorthstar;"
End With
MsgBox rs.RecordCount
rs.close
Set rs = Nothing