James,
I am also not sure that loGrid.columns will solve it, because I do not know the nature of the error. Still my suggestion is to gather as much information as possible at the moment of error.
If you gather the similar information regularly in, say, log file, then you probably will find something when comparing it against the information when error occured.
I use this approach in similar cases. The patience and persistance may give results in such rare cases.
>Yuri --
>
>loGrig.objects is the list of all objects in a container, which, for a grid, is the same as loGrid.columns.
>
>Note that the statement which follows,
lnColIndex = loColumn.controlsource
, would fail if loColumn were not a column object, as only column objects have that property.
>
>I'll make that change, if you think that's a step in the right direction.
>
>However, I have no idea when it might be that this error would occur again -- might be hours, might be weeks. Supposing, for an instant, that this were not the solution. Do you have any other suggestions?
>
>>James,
>>
>>I do not know what are loGrid.Objects and I am not quite sure that all of them are columns. I would use:
>>
>>
>>FOR EACH locolumn IN thisform.Grid1.COLUMNS
>>...
>>
>>
>>
>>
>>
>>>Yuri --