ADDPROPERTY(_VFP,"FormOne",.NULL.) ADDPROPERTY(_VFP,"FormTwo",.NULL.) ... DO FORM TopLevelOne TO loForm IF VARTYPE(loForm) = "O" _VFP.FormOne = loForm ENDIF ... DO FORM TopLevelTwo TO loForm IF VARTYPE(loForm) = "O" _VFP.FormTwo = loForm ENDIFIn the destroy event of the respective form set the reference property to null; i.e. for TopLevelTwo form add the following:
_VFP.FormTwo = .NULL.Now you can reference either form via the appropriate _VFP variable. First always test for form instance:
IF !ISNULL(_VFP.FormOne) .AND. VARTYPE(_VFP.FormOne) = "O" *-* Do something with the form ENDIF