Try
for Ctr = _Screen.FormCount TO 1 STEP -1
_Screen.Forms(Ctr).Release()
endfor
>Before opening form X, I need to make sure that all other forms are closed including other instances of form X. Putting the following code in the load of the form doesn't work.
>
>for Ctr = 1 to _Screen.FormCount
> release windows (_Screen.Forms(Ctr).Name)
>endfor
>
>This doesn't gracefully close the forms. That is, it just removes the forms from memory leaving various objects, cursors, variables, etc. So I tried the following:
>
>for Ctr = 1 to _Screen.FormCount
> _Screen.Forms(Ctr).Name.release
> release windows (_Screen.Forms(Ctr).Name)
>endfor
>
>That produces a pile of errors.
>I also tried moving this code to a seperate procedure with a "do form ..." after it which produced similar results and problems.
--sb--