do form MyForm.scx name oSecondFormThen You have the object reference oSecondForm that You can work with (You will need to have it in Your scope of course)
lcCaption = "Edit Customer" loForm = FindForm(lcCaption) if ! isNull(loForm) do something... else wait window "Form "+ lcCaption +" not found" endif PROCEDURE FindForm(tcCaption as String) as Object local lnForm, loRetVal loRetVal = null if _screen.FormCount > 0 for lnForm = 1 to _screen.FormCount if lower(_screen.Forms[lnForm].Caption) = lower(tcCaption) loRetVal = _screen.Forms[lnForm] exit endif endfor endif return loRetVal ENDPROCJust an Idea how You could query the forms collection. However You should know that a form can be _screen.Forms[1] at one time and _screen.Forms[4] at another time. The order sometimes changes. So do NOT keep the index for further reference.