Hi David,
>I see Fred got you an answer. Another way of dealing with the issue is to work backwards through the collection:
>
>for i = _screen.FormCount to 1 step -1
> if ( _screen.Forms[i].Name != thisform.Name )
> if ( _screen.Forms[i].QueryUnload() )
> _screen.Forms[i].Release()
> endif
> endif
>endfor
Yes, I checked this code and it works fine also. So, I have very tough choice now - which code is better:)) I think (I am not sure) that FOR ENDFOR should work a little faster than DO WHILE .T. ENDDO. So, now I leave your code.
But it seems very strange to me that DO FORM doesn't create an object always.
If it's not broken, fix it until it is.
My Blog