>>I need some code if you do not mind.
>>I need some code that will SHOW a FORM if it detects the FORM is already
>>in memory. thanks
>
>Simplified cheaters method:
>Assume you've got the object reference to your form in a variable called oForm. Then you can say:
>
>IF TYPE("oForm")="O" .AND. !IsNull(oForm)
> oForm.Show()
>ENDIF
>
>Even fancier would be:
>IF TYPE("oForm")="O" .AND. !IsNull(oForm)
> oForm.Show()
>ELSE
> DO FORM MyForm ;
> NAME oForm
>ENDIF
>which would instantiate the form if it did not exist.
>--------
>David M. Stowell
>D. M. Stowell Consulting
>
Hi David... thanks for the code.. here is my code and every time I call
the FORM from the CLICK EVENT of a button, it creates the FORM again. The way I am getting around this is to turn the button off once the FORM has been called. Is there a reason why the below code does not work?
In the CLICK EVENT of the calling button:
if type("myform") = "O" .and. !isnull(myform)
myform.show ( I have also used ... myform.show() )
else
do form myform
endif
thanks - rob