>>>>How can I release one form from another? (I am using VFP 5.0a)
>>>>I tried myform.RELEASE but it doesn't work. I receive the error message "objetc myform is not found"
>>>>
>>>
>>>Have you tried the following :
>>> Activate Window MyFormName
>>> _SCREEN.ActiveForm.Release()
>>>
>>About the release, _SCreen.activeform.Release(), release only the form that has the focus. Is there away to use setall with _screen.activeform??
>
>If you do Activate Window OtherWindow and set _SCREEN.ActiveForm.Release(). The focus will change to the other window.
>You can do also :
> oMyForm= CREATEOBJECT('MyForm')
> oMyForm.Show()
> oMyForm.Release()
Alternatively, you can pass the form name to the second form as a parameter, store it to a form property and use it for any purpose:
do My2ndForm with thisform
Parameters oform
thisform.ocallingform = oform
thisform.ocallingform.release()
I use this method frequently for storing information in the calling form - if I've done a find, a memoedit, etc.
HTH
Barbara