With this code you can modify it as you like. This is a simple starter for opening a DAO Recordset and looping through it.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("TableOrQueryNameHere")
Do Until rst.EOF
' do something here
rst.MoveNext
Loop
rst.Close
Set rst = Nothing

