I was told at some point that I should always execute a .movelast then .movefirst before starting to work on a recordset, so that I was sure all records were loaded. But if there are NO records, I get a "no current record" when the .MoveLast statement is executed in the following code. But if I use rstClassList.RecordCount before the .movelast, can I count on it's being valid?
Also, I was unable to paste this code into this post. I had to re-type it. Is that expected behavior? Not to be able to paste stuff in?
ls_sql = "Select * from tblStudents"
Set rstClassList = CurrentDb.OpenRecordset(ls_sql)
rstClassList.MoveLast
rstClassList.MoveFirst
li_count = rstClassList.RecordCount
TIA
LAS