Hello, I have a question about dao recordsets in MS Access's VBA. Here is my code:
rs.RecordCount ALWAYS returns 1 no matter how many records there are. I've tried to open it in SnapShot, Dynamic, Dynaset but I still get the same problem. I tried to open it in dbOpenTable mode but I get an error and it won't open the recordset. Any solutions?Code:Dim db As DAO.Database dim rs as DAO.Recordset Set db = DBEngine.Workspaces (0) (0) set rs = db.OpenRecordset("SELECT * FROM Table1") Debug.Print rs.RecordCount
Thanks,
Thai




Reply With Quote