Hi John,
.forms[] is colection, and if you remove first form, then second form be move to first place.
FOR lii=_Screen.FormCount TO 1 STEP -1
_Screen.Forms(lii).Release()
NEXT
MartinJ
>Trying to use _SCREEN.Forms to check each form at program close (Queryunload - have we saved etc.) Here is the simplified code
>
>*// Two simple modeless forms with nothing on them but a label
>DO FORM tst1
>DO FORM tst2
>=MessageBox("Ok to release forms")
>FOR EACH loFORM IN _SCREEN.Forms
> IF NOT ISNULL(loForm)
> loForm.release
> ENDIF
>NEXT
>
>One form is always ignored - in this case the first one
>What am I doing wrong ?
>TIA
>John