Allan,
This is a well known trap: you should use reverse loop to loop from Form collection. Or better use:
for each loForm in _screen.Forms()
loForm.release
next
There are bunch of threads devoted this problem. Try to find some.
HTH
>Hi Eric,
>
>Thanks for your post - still having the same problem - it isn't releasing the form that contains the command button containing code that caused the error. The form.commandbutton.click event remains in the call stack - not allowing the form to be released.
>
>Al
>
>>Then........
>>* Release all forms that are active in _SCREEN
>>for x = 1 to _screen.formcount
>> if type("_screen.ActiveForm")#"O" or ;
>> isnull(_screen.activeform)
>> loop
>> endif
>> _screen.activeform.release
>>endfor
>>
>>
>>
If it's not broken, fix it until it is.
My Blog