lnForms = _SCREEN.FormCount FOR lnCnt = 1 TO lnForms _screen.Forms(1).Release ENDFORThe reason to always release forms(1) is that the first time through the loop you have three forms and lnCnt = 1. Thesecond time through there are 2 forms and lnCnt = 2, but the third time through the loop you have 1 form and lnCnt = 3.