LPARAMETERS tcTag LOCAL lnRecNo *** Make sure a valid tag name was passed IF ! EMPTY( tcTag ) SET PROCEDURE TO Ch06 ADDITIVE WITH This *** Make sure it really is a tag for the grid's RecordSource IF IsTag( tcTag, .RecordSource ) lnRecNo = RECNO( .RecordSource ) *** Go ahead and set the order for the table SELECT ( .RecordSource ) SET ORDER TO ( tcTag ) IF lnRecNo # 0 GO lnRecNo IN ( .RecordSource ) ENDIF .SetFocus() ENDIF ENDWITH ENDIF