G
Gary
I need to perform a select query on my local table,
tblAddress, in Access 2000. When I run the following
query using ADO, I keep getting -1 for the recordcount,
but there are over 3,000 records in the table. Is there
something wrong with the way I am opening the recordset?
Here is the code, Thanks:
Dim objConn As ADODB.Connection
Set objConn = CurrentProject.Connection
Dim strSQL As String
Dim strSQLAddress As String
Dim rsAddress As ADODB.Recordset
Set rsAddress = New ADODB.Recordset
rsAddress.Open "Select * from tblAddress", objConn
MsgBox "the numer of records are " &
rsAddress.RecordCount, vbInformation
rsAddress.Close
tblAddress, in Access 2000. When I run the following
query using ADO, I keep getting -1 for the recordcount,
but there are over 3,000 records in the table. Is there
something wrong with the way I am opening the recordset?
Here is the code, Thanks:
Dim objConn As ADODB.Connection
Set objConn = CurrentProject.Connection
Dim strSQL As String
Dim strSQLAddress As String
Dim rsAddress As ADODB.Recordset
Set rsAddress = New ADODB.Recordset
rsAddress.Open "Select * from tblAddress", objConn
MsgBox "the numer of records are " &
rsAddress.RecordCount, vbInformation
rsAddress.Close