Dragan,
I've had something like this when using a Treeview.
My "solution" was to make an object reference just before the failing line, then use that full object reference in the (previously) failing line.
oTemp = Thisform.XXXX.yyyy
abc = oTemp.GetKey(.....)
good luck
>>>I have a class which handles SPTs, and it's defined like this:
>>>
>>>
Define Class spt As Table Of Table.prg
>>> Add Object params As Collection
>>> cSql=""
>>> cKeyExp=""
>>>...
>
>>>This doesn't happen regularly - I've tried to reproduce and went for several documents without a hitch. But I've seen it quite a number of times. I've even rebuilt with recompile, and it vanished for a while, then came back this morning.
>>>
>>>Did anyone have something like this?
>
>>Is params or spt destroyed or in the process of being destroyed ? It's the only thing I can see
>>
>>I've had that with textboxes firing some event (forgot which) after, or in the process of being destroyed.
>>
>>I have changed the code to check for the existance of the property prior to accessing it and never have had the problem since.
>
>The point is that it isn't destroyed, it's in a SetParams() method which just sets the properties in a member of the params collection; next it would call .Requery() method wich would create private variables based on the collection. So it's happening during a regular use.
>One thing that may matter - when one document is finished, it's saved using a transaction (both - VFP and SQL).
>
>update: I've added this line before the offending line:
>
assert pemstatus(this,"params",5) message "Params lost"
>And guess what, it didn't fire.