Return to Snippet

Revision: 48598
at July 6, 2011 02:32 by CaptainProton


Initial Code
Dim sql As String
Dim rstRecordset As recordset

sql = "SELECT * FROM xxx;"
Set rstRecordset = CurrentDb.OpenRecordset(sql, dbOpenSnapshot)

If rstRecordset.RecordCount > 0 Then
  rstRecordset.MoveFirst

  Do While Not rstRecordset.EOF
    'Access values with rstRecordset(0), rstRecordset(1), etc.
    rstRecordset.MoveNext
  Loop
End If

Initial URL

                                

Initial Description

                                

Initial Title
Loop through Recordset

Initial Tags

                                

Initial Language
Visual Basic