ModuleTest.bas 591 B

123456789101112131415161718192021222324252627
  1. Option Compare Database
  2. ' with references:
  3. ' Visual Basic for Applications
  4. ' Microsoft Access 14.0 Object Library
  5. ' Microsoft Office Runtime 1.0 Type Library
  6. ' Microsoft Office 14.0 Access Database engine object
  7. ' Microsoft ActiveX Data Object 2.8 Library
  8. ' Microsoft Scipring Runtime
  9. ' Microsoft ADO Ext 6.0 for DDL and Security
  10. Public Sub TestModule()
  11. Dim rs As DAO.Recordset
  12. Set rs = CurrentDb.OpenRecordset("TableWithData", dbOpenSnapshot)
  13. rs.MoveFirst
  14. Do Until rs.EOF
  15. Debug.Print rs![param], rs![key]
  16. rs.MoveNext
  17. Loop
  18. End Sub