Click to See Complete Forum and Search --> : First record


peachy
07-27-2004, 03:30 PM
This may sound like a dumb question but I'll ask it anyway.
When opening a recordset (rsTest)and doing a "While Not rsTest.EOF" will it always start at the first record of the recordset or should I do a "rsTest.movefirst". It is very important to start at the first record.

superdave77
07-27-2004, 07:11 PM
Unless you specify criteria that a unique ID-numbered first record does not meet, yes the cursor starts at the first record. The first record varies on your query or sorting criteria ...

rs.MoveFirst is fine but While Not rs.EOF...Loop or Do Until rs.EOF...Loop will know to go to the 'first' record without having to use rs.MoveFirst...