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

Chapter 13. Exploiting the Power of Clas... > Working with Custom Collections

Working with Custom Collections

In addition to the collections built into the Access and other object libraries, you can create custom collections. Custom collections are similar to arrays, but they offer several advantages:

  • Collections are dynamically allocated. They take up memory based only on what's in them at a given time. This is different from arrays, whose size must be either predefined or re-dimensioned at runtime. When you re-dimension an array, Access actually makes a copy of the array in memory, taking up substantial resources. By using custom collections, you can avoid that.

  • A collection always knows how many elements it has, and elements can easily be added and removed.

  • Each element of a collection can contain a different type of data.

  • Elements can be added into any element of a collection.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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