Opening a recordset from current database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What's the syntax for opening a recordset from a table the
current database? (I want to be able to loop through the
records in a table, so I assume I open a recordset.)

Thank you.
 
Dim Db As DAO.Database
Set Rst = DAO.Recordset
Set Db = CurrentDb()
Set Rst = Db.OpenRecordset("MyTable")

<<Cycle Through Recordset Here >>

Rst.Close
Set Rst = Nothing
Set Db = Nothing
 
Back
Top