• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Access Visual Basic Tools, T... > Manipulating Recordsets Using Collec...

Manipulating Recordsets Using Collections Versus Manipulating Recordsets Using Queries

The normal methods for retrieving and manipulating recordsets using Access VBA are queries and recordset loops. Yet, while there is plenty of documentation for both methods, a beginning developer may be hard-pressed to find instructions that detail when or why to use one method as opposed to another. Although some sources might explain that recordset loops should be used to modify recordset properties while queries should be used to modify recordset data, this raises more questions than it answers. For example, you can modify recordset properties using DDL (data definition language) queries and you can modify data using loops.

In a nutshell, there is an overlap between the two methods. If that’s not enough to make your head spin, you have two different object models (ADO and DAO) that can be used to manipulate recordsets. So, which method do you use for a given situation?


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint