Categories
Home
About Collection Agency
Collection Agency Classification
Nationwide Collection Agency
Site Map
 
 
   
I am trying to create a self contained class/collection which returns a collection of Customer Numbers for a given postal/zip code.

Question:
I am trying to create a self contained class/collection which returns a collection of Customer Numbers for a given postal/zip code. What I want to do is something like :- CustomerCollection.PostCode = "12345" for each blah in CustomerCollection Debug.Print CustomerCollection.CustomerNumber next In the PostCode Let I would then get all the relevant Customer Record and return them in the collection. I have already done it with a method but I would like to use the Let instead. Any ideas?


Answer:
If I'm reading you correctly, you need to know how to implement an enumerating interface to your collection, so that you can use For ... Each on your object, instead of having to pass a collection out of a function call? Here's a link describing how to do this: http://www.mvps.org/vb/hardcore/html/delegatingiterator.htm It's in the context of a larger example, but it's a concise description of the relevant concepts.



Submit your comment or answer


 

Home About Collection Agency Collection Agency Classification Nationwide Collection Agency Site Map


Privacy Policy