>All,
>
>I am having a problem with the ActivateCell function.
>
>I have two grid on a form and I want to be able to tab from one to the other. When I leave one of the grid and reenter from the top, the active cell is the last cell activated even though I am issuing a This.Grid2.ActivateCell(This.Grid2.RelativeRow,1) command.
>
>Below is the code for my NextGrid function
>
>
>*NextGrid()
>loNextGridList = This.GetNextGridList()
>
>IF ISNULL(loNextGridList)
> RETURN loNextGridList
>ENDIF
>
>loNextGrid = loNextGridList.GridList
>liNextColumn = loNextGrid.GetFirstColumn()
>
>loNextGridList.SetFocus()
>liRelativeRow = loNextGrid.RelativeRow
>loNextGrid.ActivateCell(loNextGrid.ActiveRow,liNextColumn)
>
>
>
>This code should move from the last column of the previous grid to the first column of the next grid, but the cell last activated in the next grid is reactivated.
>
>What am I doing wrong?
>
>TIA
>
>Rex
Rex,
It's very hard to see what's going on there w/o reproducing it. Instead I would suggest an easier way (IMHO) rather than to use relative*, active* properties. For row index, use table's recno(), for column index instead of setting focus to grid :
loNextGridList.Columns(ix).SetFocus()
Hope helps.
Cetin