Hi Borsislav,
My guess is that your grid is linked to a table/cursor, and that it is denied permission to close because it is locked.
HTH,
Marc
>I change my code to
>
>lnFormToClose = 1
>FOR lnForm = 1 TO _screen.FormCount
> IF _screen.Forms(lnFormToClose).Baseclass == "Form"
> _screen.Forms(lnFormToClose).Release()
> ELSE
> lnFormToClose = lnFormToClose + 1
> ENDIF
>ENDFOR
>
>but, when I have Grid in form and that Grid has focus, the form is not released, when other control has focus the form is released properly.
>
>I don't know what to do. (Snip, snip...) :-)
>
>
>Tnx Boris
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.