Hi Marcus,
>If it runs through this loop more than 3 times I get the error.
There are several bugs in VFP that would cause VFP to crash the third time. Mainly these are things where object references are involved. For example:
a) Having a property with an assign method and assigning three times the same object reference will release that object, or GPF VFP if you modify the property within the Assign method.
b) Executing 3 times NVL(property,THIS) will crash VFP with a C5 error when the property is NULL in all cases.
I'm sure there are more, and the number 3 in your mail caught my attention.
Christof
--
Christof