>>For Some reason I can't reply to any message lower than this one?
>>
>I was confused too. This is because the code you've copied from the Hacker's guide is on a very looooong line. You have to scroll horizontally in order to get to the reply button.
>
>>Thanks for the code... I will have to work something out maybe in the destroy event for clearing out indexes etc.
>
>No need to do anything. VFP takes care of the house keeping. I've been using this approach for a long time.
Dohh!
I still can't get this to work
I am using your code to use the table again
as soon as I try and index the table VFP hangs
Select (lcRecordSource)
If NOT File(DBF())
IF Not goProcs.MakeCursorWritable(lcRecordSource)
Return
Endif
Endif
If lnGridPos = 1
lcName = Sys(3)
lcFullName = Addbs(SYS(2023)) + lcName
IF This.SortDirection = 'A'
Index on (loHeader.Parent.ControlSource) To (lcFullName) Ascending
Else
Index on (loHeader.Parent.ControlSource) To (lcFullName) Descending
Endif
set order to (lcName)
Will Jones