B
Bill H
I am trying to open a recordset in a function, using DAO syntax. If I
specify a table name, the record count for the recordset is correct.
However, if I use a SQL statemet, the record count is only one... Any help is
well appreciated....
Function FirstOpen() As Integer
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strQry As String
strQry = "SELECT TblCDS.* FROM TblCDS;"
Set db = CurrentDb
Set rs = db.OpenRecordset(strQry, dbOpenDynaset)
MsgBox rs.RecordCount
MsgBox "rsopen"
rs.Close
Set rs = Nothing
End Function
specify a table name, the record count for the recordset is correct.
However, if I use a SQL statemet, the record count is only one... Any help is
well appreciated....
Function FirstOpen() As Integer
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strQry As String
strQry = "SELECT TblCDS.* FROM TblCDS;"
Set db = CurrentDb
Set rs = db.OpenRecordset(strQry, dbOpenDynaset)
MsgBox rs.RecordCount
MsgBox "rsopen"
rs.Close
Set rs = Nothing
End Function