Troy,
It's known issues with collections. A FOR EACH loop uses COM interface to access items in a collection. It's recomended to use regular FOR ... ENDFOR loop instead. For more details see
FOR EACH Enumerations of VFP Collections Do Not Provide True Object References Bug #9
>Hello,
>I am trying to work with some objects that have been added to a collection class from a table using the scatter command. However every time I try to use the for each command nothing really works but, if I go through with the item method it works fine.
>
>This does not work.
>
>oHolder = createobject("Collection")
>use sometable
>scan all
> scatter memo name oTemp
> oHolder.Add(oTemp)
>endscan
>for each oEtc in oHolder
> ? oEtc.name
>endfor
>
>
>This will work.
>
>oHolder = createobject("Collection")
>use sometable
>scan all
> scatter memo name oTemp
> oHolder.Add(oTemp)
>endscan
>for i = 1 to oHolder.count
> ? oHolder.item(i).name
>endfor
>
>
--sb--