ofrmTest = CREATEOBJECT("frmparam", "string1", "string2") * The instance of the modal form is created, parameters are passed. ofrmTest.Show() && or ofrmTest.Show(1) to make it modal * Modal form is shown. * Code execution stops until the modal form is closed. * If the form is closed, it is destroyed and ofrmTest=NULL then. cChanged = ofrmTest.cReturnValue * This line is pointing to non-existent object property, as the modal form is gone already ofrmTest.Release() * You are trying to call a method of non-existent form object. * However RELEASE ofrmTest *will release the variable that had a reference to the created form object.To achieve what you want, you need to run your modal form with
DO FORM frmparam1 TO cChangedwhere frmparam1 is a form (SCX) based on your frmparam form class (if you really need a form class here).
>You can return a value from any modal form by putting a RETURN <value> in the unload event of the form. >>
>>>ofrmTest = CREATEOBJECT("frmparam", "string1", "string2") >>>ofrmTest.Show() >>>lcChanged = ofrmTest.cReturnValue >>>ofrmTest.Release() >>>>>>