IF nKeyCode = 13 OR nKeyCode = 9 && Enter or Tab This.Move2NextRow() NODEFAULT ENDIFThis code in Move2NextRow():
LOCAL lnMaxRows WITH This.Parent.Parent *** Calculate the maximum number of rows in the grid lnMaxRows = INT( ( .Height - .HeaderHeight - IIF( INLIST( .ScrollBars, 1, 3 ), SYSMETRIC( 8 ), 0 ) ) / .RowHeight ) *** If we are sitting on the bottom row in the visible portion of the grid, *** Scroll the grid down a row in case there is a next record IF .RelativeRow >= lnMaxRows .DoScroll( 1 ) ENDIF .ActivateCell( .RelativeRow + 1, .ActiveColumn ) ENDWITHMarcia