Noel, you may have the code similar to this:
oApp.RunForm(tcFormName)
*** oApp.RunForm method ***
PARAMETER tcFormName
FOR n = 1 to _screen.FormCount
IF _screen.Forms[n].BaseClass == "Form"
IF _screen.Forms[n].cSCXName == tcFormName+".SCX"
IF !_screen.Forms[n].lMultiInstance
ACTIVATE WINDOW (_screen.Forms[n].Name)
ELSE
DO FORM (tcFormName)
ENDIF
ENDIF
ENDIF
NEXT
This code supposes you have .cSCXName property in your base form class and during form initialization you store there the form's SCX name obtained with SYS(1271)
You also may check if multiinstance is allowed for the particular form, storing the proper value in form.lMultiInstance property.Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison