The Collection Object

Mile-O

Back once again...
Local time
Today, 10:49
Joined
Dec 10, 2002
Messages
11,316
Does anyone use the collection object much in VBA or are you just more likely to use it in VB?

I'm only asking as I've never used it in any of my databases although I have used it within VB along with the Dictionary object.

If you do use it in Access, what do you use it for?
 
Not in a while. If I really need a class, I tend to make it myself =)
 
You'd be far more likely to use a collection if you take an object oriented approach to solving a problem. In an OOP solution, your data, and the functions you might perform on your data are commonly encapsulated in a class module, and being able to manipulate an instance of your class as a member of a collection offers huge flexibility.
I use collections routinely, but this is because I increasingly choose to solve problems using class modules. What I'm constantly amazed by is the robustness of this approach. You can completely gut and re-work a class and provided you expose the properties and methods your other objects depend on this never breaks anything.
You know that feeling when the system you're working on keeps growing and new modules cause instabilities in other modules and eventually you realize a structural or design flaw that demands a huge rework of the entire concept?
OOP is the answer. Collections are a piece of this.
 

Users who are viewing this thread

Back
Top Bottom