>>>Does anyone have a way of preventing multiple instances of a form without setting the Form WindowType property to 1-Modal?
>>
>>Use the code similar to:
>>
>>If type('oMyForm') # 'O' or isnull(oMyForm)
>> oMyForm = creatobject('MyForm')
>>endif
>>
>>
>>Well anything like that should work.
>>
>>Tom
>
>
> I am not calling the forms as classes. I am using DO FORM. Is their something I could put in the Init method?
Hi Richard, before issuing your "DO FORM my_form", disable
the menu option or the button that you use to do that, or loop
through the forms and check the "caption" to see is it is already
running, also you can use a "flag" that you will turn on and off
every time you run or exit your form.
HTH
Good Luck.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould