João,
A modal form and it's reference is released as soon as it is closed. You can use TO option of DO FORM command to return a single value.
DO FORM gc_procura_doc_fac WITH thisform.oDocFac, &lcAliasArm..c_codigo_2, oEmpresa TO m.pk
thisform.ltable_pk = m.pk
...
RETURN This.lChave
>Hi all,
>
>I call my Modal form, from a command button, this way
>
>DO FORM gc_procura_doc_fac NAME oFM LINKED WITH thisform.oDocFac, &lcAliasArm..c_codigo_2, oEmpresa
>then i try to get the return value
>thisform.ltable_pk=oFM.lChave
>
>and i get this error
oFM is not an object
>
--sb--