Jim, I think there's one more item to consider. Kin Keung mentioned that one of the forms was MODAL. That being the case, wouldn't it be better to use the _screen.activeform.release() instead of _screen.forms(1).release? This would automatically pick the active modal form to be the first form released.
Or am I missing something obvious?
Thanks,
Barbara
>Kin Keung,
>
>Cetin has the right idea but the code will fail. Try this code;
>
>
>lnForms = _SCREEN.FormCount
>FOR lnCnt = 1 TO lnForms
> _screen.Forms(1).Release
>ENDFOR
>
>
>The 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.