>For Each oForm in _SCREEN.Forms > If oForm.Name=="MyForm" > oForm.mymethod() > Exit > Endif >Endfor >Another thing which worked fine in 5.0 but behaves differently in 6, is that sometimes the _screen.activeform will not return a referrence to the active form, but to an ActiveX sitting on that form. One solution is to do something like this:
Function ActiveForm oForm=_screen.ActiveForm if not isnull(oForm) && or should we check for type('oForm')='O'? do while oForm.BaseClass#'Form' oForm=oForm.parent enddo endif return oFormThis function may return .null.