I think using RecordSourceType = 1 is really what you want, but rather than rebuilding the cursor each time the user wants to change the order, build the cursor once and then create tags for all the possible sort orders.
In order to build more than one tag on a cursor you create with a SQL Select, you'll need to make it writeable. To do that, USE the DBF() of the cursor AGAIN with a new alias, in a new work area. You can then close the original cursor, and can build as many tags on the cursor as you want.
>I am trying to setup a grid to display the results of a SQL using RecordSourceType=1. I also want the click of the headers to set the order of the SQL to that column. Unfortunatly, when I run the query, the grid loses sope of the cursor and the code in the headers (Click) is lost. I see that there is a RecordSourceType=4 (SQL) but there is NO documentation on it. It seems to me that using RecordSourceType=4 would allow me to change the Group By in the SQL without losing the cursor.
>
>Any Ideas?
>
>Thank you.
>
>Todd Cottengim