I wanted to do it that way, but how do I create a generic collection class of which I can reference the value of an item in that sense ( fields(n).value )? In your case, you create an object on an existing collection class. I want to build the class. I would much prefer the fields(n).value syntax, but I can't figure out how I would do that in VFP.
Just brainstorming here, but do you think that it would be possible to create an array of references to objects and then use the properties and methods of those individual objects by dereferencing through the array references?
For example:
DIMENSION myarray(10)
myarray(1) = CREATEOBJECT("Object1", "MyClass")
...
and then myarray(1).Value???
But then, how would I create a class that holds all the created objects and be able to reference them such as Parent.MyObjects(1).Value???
I think I've gone cross-eyed...
Phillip
>>Thanks for the help. I was trying to go about it the wrong way. Instead of fields(n).value, it should be fields.value(n). This makes more sense. Thanks for your help.
>>
>
>Is Fields(n).value a wrong way ?
>
>I posted on the file section (#1126) a collection sample using oRs.Fields("MyField").Value to access values.
>
>Marcel
"D'OH!" --Homer Simpson