>Version: VFP 6.0
>Problem:
> The grid is large enough to displays 6 rows. There are 50 blank rows in all. On the last column.textbox I have the following code in the KeyPress event.
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>IF nKeyCode = 13 OR nKeyCode = 9 && Return or Tab
> SELECT c_det && Table assigned to grid
> IF !EOF()
> THISFORM.grid1.SetFocus
>
> THISFORM.grid1.ActivateCell(THISFORM.grid1.ActiveRow + 1,1)
> ENDIF
>ENDIF
>
>This event seems to work for all rows except the 6th. Instead of the focus going to the 7th row, it returns to the first column on the 6th.
>
>I'm sure I'm missing something simple, just been staring at the code too long. Please Help
>
>Galahad
Why not change the code to something like:
IF nKeyCode = 13 OR nKeyCode = 9
SKIP IN c_det
IF EOF("c_det")
GO BOTTOM IN c_det
ENDIF
THISFORM.grid1.SetFocus
ENDIF
You can fiddle with as needed to set it up the way you want.
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.