Scott,
>but when I run it from the grid header, it runs the first time and the second time I click the header It's as though there is no code at all.
That's because there isn't any code to run.
The event of recreating the cursor out from under the grid, causes the grid to self destruct, and then rebuild itself. When it rebuilds it uses the default column, header and textbox classes. I don't use grids in this fashion but I think the solution is to set the RecordSource = "" before you create the new cursor and then restore RecordSource.
I think you should look at using temp indexes on a view. This way the grid will maintain itself.
You can also just flush the grid yourself and rebuild it, substituting your own Header class, Header subclasses can only be defined in a .PRG.