>I have a grid with seven columns. All works great. In the click event of several headings I have some code to change the index order.
>
>select cust
>mrecno = recno()
>set order to lname ( or what ever column they clicked in)
>goto mrecno
>thisform refresh
>
>I want the grid to continue to display the currently selected record. Instead it jumps to a different record most of the time. Any suggestions?
John,
My first sufggestion is to dump all the goto rec stuff. Changing the order of a table does not move the record pointer so you don't need to restore it. Second, don't call the form's refresh, instead call the grid's refresh as in;
select cust
set order to lname
this.parent.parent.refresh()