Collections are a concise way of saying "an indefinitely sized gathering of a variable number of distinguishable objects having the same exact data type."
In Access, you have collections such as "AllTables" "AllQueries" "AllForms" etc etc
You always have certain abilities within collections. For instance
collection-object.Count - tells you how many of the object you have
collection-object
- points to the nth element of the collection
collection-object
.Name - tells you the name of the nth element
collection-object("name") - selects the element of the collecting having that name - but you can get an error if "name" isn't the name of one of the members of the collection.
Usually, you do a SET obj-var = collection("name") and then work through the object variable if you have a lot to do with the object.
This one sometimes gives someone grief. Collections can contain nested collections! For instance, AllTables is a collection of TableDef objects. But ... a TableDef object contains a collection of FieldDef objects and a collection of Index objects.
AllForms is a collection of Form objects. A Form Object contains a collection of Control Objects. Some control objects such as list boxes can be set to multi-select, in which case the control contains a collection of Selected rows (which is a type of object).
External objects can also contain collections. The file system (FileSystem object) is an object with collections. Each disk contains a collection of folders; each folder contains a collection of files.
If you open an Excel workbook object, it contains a collection of sheets. Each sheet contains a collection of rows, each of which contain a collection of cells (representing columns.) Simultaneously, that same sheet contains a collection of columns, each of which contain a collection of cells (representing rows.)
In Word, your document has a collection of paragraphs. Each paragraph contains a collection of words. (No, I'm not exaggerating this for a single minute.) It also has a collection of tables (if the document has any tables). If it is a traditional Word table, that table has collections of Rows and Columns similar to the way Excel does what it does.
I will not bother you with Outlook and Power Point, but yes, they have their share of collections too.
In essence, the Microsoft Common Object Model defines the collection as the way for managing multiple similar but distinguishable objects and it allows for all sorts of hierarchies.
Don't fear collections. They are your friends, even if traversing them is a pain in the
toches. Once you figure out collection management paradigms, you have got a significant portion of complex VBA issues solved and understood.