Hi, I want to return the name of all objects on a form, so I can
programatically access some of them. I thought the Objects collection might
do the trick, but all I get from it is a Count property. Using VFP9, and
thanks for any help.

Neil

Re: Return object name for each object on a form by Neil

Neil
Tue Oct 11 19:10:32 CDT 2005

Hmm, make that object name

"Neil Waterworth" <spammonkey at microsocks.com> wrote in message
news:eJAC05rzFHA.2312@TK2MSFTNGP14.phx.gbl...
> Hi, I want to return the name of all objects on a form, so I can
> programatically access some of them. I thought the Objects collection
> might do the trick, but all I get from it is a Count property. Using VFP9,
> and thanks for any help.
>
> Neil
>



Re: Return object name for each object on a form by Eugene

Eugene
Tue Oct 11 20:01:50 CDT 2005

Neil Waterworth wrote:
> Hmm, make that object name
>
> "Neil Waterworth" <spammonkey at microsocks.com> wrote in message
> news:eJAC05rzFHA.2312@TK2MSFTNGP14.phx.gbl...
>
>>Hi, I want to return the name of all objects on a form, so I can
>>programatically access some of them. I thought the Objects collection
>>might do the trick, but all I get from it is a Count property. Using VFP9,
>>and thanks for any help.
>>
>>Neil
>>
>
>
>


this will get you one level of hiearchy, if you want to drill down into
any container objects that will take a recursive method

LOCAL lcObject as Object
FOR EACH lcObject IN thisform.Objects
? lcObject.Name
ENDFOR

Re: Return object name for each object on a form by Neil

Neil
Thu Oct 13 13:37:56 CDT 2005

>>>Hi, I want to return the name of all objects on a form, so I can
>>>programatically access some of them. I thought the Objects collection
>>>might do the trick, but all I get from it is a Count property. Using
>>>VFP9,
>>>and thanks for any help.
>>>
>>>Neil
>>>
>>
>>
>>
>
>
> this will get you one level of hiearchy, if you want to drill down into
> any container objects that will take a recursive method
>
> LOCAL lcObject as Object
> FOR EACH lcObject IN thisform.Objects
> ? lcObject.Name
> ENDFOR

Thanks Eugene, just what I was looking for.