PROCEDURE OPEN_INCIDENT LOCAL i as Integer, lFormsShut as Boolean lFormsShut = .T. FOR i = _Screen.FormCount TO 1 STEP -1 * backwards because the form count will be changing IF UPPER(_Screen.Forms[i].BaseClass) == 'FORM' IF _Screen.Forms[i].QueryUnload() _Screen.Forms[i].Release(.T.) && do not confirm release ELSE lFormsShut = .F. ENDIF ENDIF ENDFOR ...Under the conditions that it works the forms release on the line _Screen.Forms[i].Release(.T.). Under the conditions that it does not work the forms will not release until the procedure executes the RETURN at the end. Unfortunately there is a lot of code between where the form should release and the RETURN that expects the forms to all be closed.