When you click datagrid to select a row, the record you mark becomes current and recordset pointer automatically skips to it. You don't have to write any code to determine it