>>I was wondering if it's possible to get a printout of all the ControlSources used in a form?
>
>Is this design time or run time? If design time you can use ASELOBJ() to get a reference to the form object open in the designer, and then use J. Crescencio's algorithm. Post back here if you need help drilling down into containers, but it's not too difficult. The general idea is have a function you pass an object ref, then the loop goes through the controls collection. If it's a container you pass that object to the same function recursively.
>
>Something like:
>
>CLEAR
>DIMENSION Y[1]
>x=ASELOBJ(Y,1)
>
>DrillDown(Y)
>
>FUNCTION DrillDown(toO)
> LOCAL o
> FOR EACH o IN toO.OBJECTS
> IF TYPE( 'o.ControlSource' ) = "C"
> ?o.name, o.parent.name, o.ControlSource
> ENDIF
> IF PEMSTATUS(O, "OBJECTS", 5)
> DrillDown(o)
> ENDIF
> NEXT o
Nancy,
My need was at design time.
Thank you for your insightful reply!
I ended up using Sergey's approach.
I've now been able to do what I needed.
I needed to produce a checklist of variables to ensure that everything had been initialized and scoped properly. I'm in the process of taking a FoxPro 2.6 system and bringing it to the WEB. As a result I have a lot of converted screens/forms and I didn't want things slipping thru the cracks.
The others gave some good/insightful replies too!
Thank you to all of you who replied.
Rick