>The for loop initial value is only evaluated first time into the loop, and you have to decrement through it because the forms array collapses itself down as forms go away. The loop counter was 2 in the post mortem dump that got delivered in my morning email.
>
>Sometimes I'll get stupid errors like Columns is not an object in a builder that's working on a currently instantiated grid, cancel and run it again and it works just fine. Ah VFP you gotta love it. *g*
>
I'm aware of the .FormCount collapsing on itself. That's why I don't like it in the FOR...ENDFOR structure. IMHO, the values in that type of iteration structure should never be subject to internal or external modification. I'd just do something like this:
i = _SCREEN.FormCount
DO WHILE i # 0
IF (_SCREEN.Forms[i].QueryUnload())
_SCREEN.Forms[i].Release()
i = i - 1
ELSE
_SCREEN.Forms[i].Activate()
ENDIF
ENDDO
That way at least you know nothing funny is going on there.
George
Ubi caritas et amor, deus ibi est