For Each record In recordset?

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Can the 'For Each... Next' statement be used to iterate
through each record in a record set? At the moment I am
using a while not eof iteration, which works but could be
neater with the above.

Regards

Jack
 
No.

Using the "While Not .EOF" is one way of using a Do Loop for iterating
through the recordset, and is the one most used.
 
Sorry, no.

For Each ... Next is used to traverse through the Objects
of a Collection and Recordset is NOT a Collection.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top