>Ok, it works.
>
>It now returns a string which is the full hierarcy
>all the way down to the form.
>
>Not what I need. Thanks anyhow
If you know container name, it will be easy to to convert result into the object reference you want.
Another way to rey, is to traverse hierarchy back until you find a container. Something like
DO WHILE .T.
TRY
oParent = This.Parent
CATCH
oParent = Null
ENDTRY
DO CASE
CASE oParent = Null
EXIT
CASE oParent.Class = "Container"
EXIT
CASE oParent.Class = "Form"
EXIT
ENDCASE
ENDDO
--sb--