The problem is that each time you release a form, the formcount is reduced by 1 so you end up going past the number of existing forms. Try this:
DO WHILE _SCREEN.FormCount>0
_SCREEN.Forms(1).Release()
ENDDO
>I am trying to programmatically release all system forms in an appliation. I thought the following code would do the trick:
>
>FOR x = 1 TO _SCREEN.FormCount
> _SCREEN.Forms(x).Release()
>ENDFOR
>
>Whenever I run this code, I encounter error 1924, "FORMS is not an object". Can anyone tell me what I'm doing wrong?
>
>James