João,
In addition to what Sergey posted, if you Hide the modal instead of releasing it, you can use the technique you are using now. Hiding the modal form will allow VFP to continue processing after the DO FORM call and the form will still exist as an object.
Note:
After you retrieve the value, you will have to manually release the form.
thisform.ltable_pk=oFM.lChave
oFM.Release()
HTH.
>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
>
>Thank's
>
>João Batista
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao