FUNCTION GetForm LPARAMETER cFrmName, cCond * === returns a handle to the form named cFrmName * NOTE: Case and length sensitive * optionally locates the instance satisfying m.cCond * cCond can be things like '.myProperty="FRED"' * returns .NULL. if not found * Remember to eventually release variables being assigned the form name otherwise the form may not release LOCAL oFrm, oRetFrm oRetFrm= .NULL. FOR EACH oFrm IN _SCREEN.Forms WITH m.oFrm * if we have a form of the correct name, is it the instance we need (cCond)? IF .Name == m.cFrmName ; AND (EMPTY(m.cCond) OR EVALUATE(m.cCond)) oRetFrm= m.oFrm EXIT *VVVVV ENDIF ENDWITH ENDFOR RETURN m.oRetFrm <\PRE> >David, > >I use the .Name property in my udf used to disable menu items. The SKIP FOR is: ><b>FormRunning( "frmTheFormName" )</b> > ><pre>* FormRunning.PRG 08-Mar-98 > >* determine if a particular form is running. > >* It checks the Name property > >lparameter pcFormName > >local i, llRetVal > >llRetVal = .f. >pcFormName = upper( pcFormName ) > >for i = 1 to _screen.FormCount > if ( upper( _screen.Forms[i].Name ) == pcFormName ) > llRetVal = .t. > exit > endif >endfor > >return llRetVal>So yes you can "use" the form .Name property to look for a form. But you can't manipulate the form via it's .Name. The only time .Name is used for anything of consequence is when there is object containership involved. If the form is part of a formset then things change a little. Then the form .Name distinguishes one form from another, just like .txtFirstName is different that .txtLastName inside the same container.