>>_screen.activeform.activecontrol.name
>>returns: grid1
>>But what i want is
>>_screen.form.pageframe1.page1.grid1
>
>Something like (not tested, off my melon):
>
>
lcControl = _screen.activeform.activecontrol.name
>loControl = _screen.activeform.activecontrol
>do while not compobj(loControl, _screen.activeform)
> loControl = loControl.Parent
> lcControl = loCOntrol.Name + '.' + lcControl
>enddo
>?lcControl
>
>You can replace the form name with _screen.activeform if you want, but I don't see how good it is, you still have an object reference.
I have tested.
Its work perfect.
Thanks.