>Hi all,
>
>Is there a way to convert an object pointer into a string expression? I have a variable oMyForm, pointing to a specific screen form. For example:
>
>oMyForm = _screen.forms(2)
>
>Now I need to convert this oFormName into a character string, say cMyForm, which is expected to contain a value like "_screen.forms(2)", how should I do that?
>
>Thanks in advance.
>
>Best regards,
>Abe
You could use something like:
FOR n =1 to _screen.formcount
IF oMyForm.Name == _screen.forms(n).Name
cMyForm = "_screen.forms(" + alltrim(str(n)) + ")"
ENDIF
ENDFOR
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison