WITH This GO BOTTOM IN ( .RecordSource ) SKIP - <Number of rows - 1> IN ( .RecordSource ) .SetFocus() ENDWITHBut if you actually test this approach, you will quickly discover that it doesn't perform correctly. Even though the grid is positioned on the correct record, this record is in the middle of the page and you must use the PAGE DOWN key to see the last record. If this is a common requirement for your grids, this sample code in the Init() method of EndOfGrid.scx is generic and can easily be put in a custom method of your grid class:
LOCAL lnMaxRows, lnRecNo *** Display the last page of the grid when the form instantiates IF DODEFAULT() WITH Thisform.GrdCustomer *** Calculate the maximum number of rows per grid page lnMaxRows = INT( ( .Height - .HeaderHeight - ; IIF( INLIST( .ScrollBars, 1, 3 ), SYSMETRIC( 8 ), 0 ) ) / .RowHeight ) GO BOTTOM IN ( .RecordSource ) lnRecNo = RECNO( .RecordSource ) *** Go to the record that should be in the first row of the last page SKIP -( lnMaxRows - 1 ) IN ( .RecordSource ) .SetFocus() IF .RelativeRow < 1 *** Make sure it is the first relative row DO WHILE .RelativeRow # 1 .DoScroll( 0 ) ENDDO ELSE DO WHILE .RelativeRow # 1 .DoScroll( 1 ) ENDDO ENDIF *!* Now go back to the last record in the grid GO lnRecNo IN ( .RecordSource ) .SetFocus() ENDWITH ENDIF