1) If I check recordcount without move rst to last position I get wrong number of recordcount.
2) If I move rst to last position, number of recordcount is correct, but! If there's no record in my string I get an error that rst can't move to last position:/
So the question is, how to check correctly RecordCount even if my query in string has no record?
It's about DAO.Recordset
Code:
rst = CurrentDb.OpenRecordset(strSQL)
msgbox nz(rst.RecordCount, 0)
2) If I move rst to last position, number of recordcount is correct, but! If there's no record in my string I get an error that rst can't move to last position:/
Code:
rst = CurrentDb.OpenRecordset(strSQL)
rst.MoveLast
msgbox nz(rst.RecordCount, 0)
So the question is, how to check correctly RecordCount even if my query in string has no record?
It's about DAO.Recordset