LOCAL lnMaxRows WITH This *** 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 ) ENDWITH