>Thanks Trey, I have also found I can click and drag a column. So if I increase the columncount by 1 (as you suggested) it adds the new column. I then clicked and draged the column to where I wanted it!
>
>However, in a FOR EACH oCol in THISFORM.grdAsso.COLUMNS, VFP still thinks it's the 10th column and not the 2nd, which it appears to be.
>
>Thanks again for the input.
>Julian
>
>PS: Any thoughts on this ordering?
Column Index is what For Each and Columns(i) uses. It's always the order they were added in.
What are you checking in that For Each loop to see if it's the 2nd column?
Checking the ColumnOrder should do it.
One other way would be do a double loop, e.g.
With thisform.grdAsso
For ji = 1 to .ColumnCount
For Each loCol In .Columns
If loCol.ColumnOrder = ji
EndIf
EndFor
EndFor
EndWith
Insanity: Doing the same thing over and over and expecting different results.