
Class modules 97 - Refering to array within a custom class module
New within access97 is the ability to create custom class modules. I am
trying to use this new functionality to creat a custom object that will
represent a report. By referencing this object I will be able to see what
will need to be included in a report and other basic information such as
address and company name.
I have the problem that there is not all that much documentation on this
new functionality and therefor have hit many problems. Here is one that
would be good if it was solved.
Within a class module I have defined properties that are of type variant
and they conatain an array. The following line can be used to refer to one
of the elements of the array where class1 is the class modules name and
array1 is a two dimensioned array.
temp = Class1.Array1(1,0)
This works.
If I define an object at the begining of the function and then assign it to
the class and then try to refer to it in the same way as follows
dim Object1 AS Object
set Object1 = Class1.Array1
Temp = Object1(1,0)
Does not work and returns "Object not a collection" error. Should this
happen and if so what do I do about it. Also can you suggest any new
documentation on this new functionality.
I hope you can help and if you can it would be appreciated.
Matthew van der Linden