Collection within Collection

P

Peter Kinsman

I posted this on the microsoft.public.office.developer.vba board, but that
does not seem to get many hits, so I will try again here.

In the course of developing a method of converting IBM midrange programs
written in RPG to VBA, I wish to create a collection of S36File objects with
a number of properties, one of which is is a collection of S36field objects.
I have created Class Modules for S36File and S36Field, and successfully
appended a file to the S36Files collection, but cannot sort out the syntax
for
adding a field. I would have expected to use something like:
S36Files(1);S36Fields.Add S36Field
but I am wondering if the Fields collection exists in its own right rather
than as a property of the Files collection.

Yet again I am trying to run before I have leamed to walk, but I wondered if
anyone else has tried something similar - it is similar to the Fields
collection which is a property of each member of the Tabledefs collection,
but that is DAO rather than VBA. There are a couple of Knowledge Base
articles suggesting a work round, but they just serve to confuse. The only
thought I have is to have the FileName as a property of the Fields, which
could then be in a single collection.

Any suggestions would be appreciated.

Many thanks

Peter Kinsman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top