>I know there has to be a standard way to do this. Within my app I launch forms from menus, from command buttons within other forms, and by double-clicking areas of forms, all using the DO FORM command. I am using the following code in the LOAD event of some of my forms to prevent creating a new instance of the form if it already exists:
>
>IF TYPE("Reportselect") = "O" and !ISNULL(Reportselect)
> Reportselect.Show()
> RETURN .F.
>ENDIF
>
>Of course "Reportselect" is the name of this particular form. How can I use a generic version of this code in the base class for my forms.
>
>
>Thank you kindly for your help.
You can also try WVisible() or WExist() for this:
If WVisible('frmparts')
Activate Window frmparts
Keyboard '{CTRL+F5}'
Else
Do Form parts
Endif
Where frmparts is the form's name as specified in the Name property.
HTH