>>LPARAMETERS nColIndex
>>if lastkey() = 13 and nColIndex = 1 && Pressed enter at last column
>> go top in (this.recordsource)
>> this.refresh
>> this.columns(3).setfocus()
>>endifCetin
>
>Thank you both for your information and ideas. It seems that columns() was the tool to fix the problem. Then all that was left was for VFP and me to sort out just which column was which - I'd reordered the columns after creating the grid - user feedback - blame them!
>
>Sarah
Hi Sarah,
You could stop biting your fingernails :) Views wouldn't help much for data corruption as Mark said, but relax, table corruption is not much (compared to some other DBMS I would even say very rare :)) and generally not directly related to FP (network errors, driver faults etc are more responsible).
Instead of using columns' indexes what about using names or controlsources ?
with thisform.myGrid
for ix = 1 to .columncount
if upper(.columns(ix).controlsource) = ;
upper(.recordsource+".myName")
.columns(ix).setfocus()
endif
endfor
Cetin