>>>The problem seems to happen when the focus is set to a control in the grid placed on the form. When the cursor is outside the grid all is OK.
>
>>A form will not release if any reference to it is still active.
>
>So I'm wondering when such a "blocking" reference can arise? And how it disappears when I click outside the grid?
>No, it's impossible.
Firstly, one (maybe irrelevant) tip: you should loop _SCREEN.Forms in reversed direction:
nLoop=_SCREEN.Formcount
For n=nLoop to 1 Step -1
...
Check again, do you have any custom form references with Type="O"?
Edward Pikman
Independent Consultant