>Hi Everyone!
>It seems like I still don't understand how this thing works. It simple when we have an array like Example says, but if I want to use form's collection like Objects or Controls.
>For example I want to Remove All objects on a form, I was trying to do something like:
>
>FOR EACH oControl IN ThisForm.Controls
>ThisForm.RemoveObject(oControl.Name)
>ENDIF
>Of course it's not working and I'm not suprised, but it's very interesting how this thing suppoused to be to get it work.
>Thanks!
In addition to replies you already got:
do while type('thisform.controls(1)')="O" and not isnull(thisform.controls(1))
thisform.removeobject(thisform.controls(1).name)
enddo
i.e. when you remove the first member of collection, it shrinks until all members will be removed.
Edward Pikman
Independent Consultant