Hi Bob,
I found one version on my class for the similar purpose in this
Re: Active Cell colors and grid row colors Thread #
1047803 Message #
1048061Didn't check how recent this code is, but I remember it allows to add indexes on the fly.
>>>I’m using a local view that is populated from multiple tables as the RecordSource for a 3 column grid. It’s working fine, but I want to allow the user to change the ORDER presented dynamically by clicking on the respective grid header.
>>>
>>>I have coded the SQL's ORDER clause by setting it as a ?parameter. I change the parameter, do a requery(), and then a refresh() all in the header click method. I'm bumping into pop-up messages asking what value I want for my parameter.
>>>
>>>What general approach should I be using?
>>>Bob
>>
>>I would recommend a sortable grid. For example,
Re: Adding code to event Thread #
1276895 Message #
1276900>
>Thanks Sergey
>
>On reading through the referenced code, I saw that you were using indexes that were already created to control the displayed order, where I was trying to change the SQL ORDER BY clause. I gave up on my approach, created 3 indexes, and got everything to work fine with SET ORDER TO. As this was my first try at dynamically reordering a local view in a grid, I hand coded it to make sure that I understood what was going on. I'll look at implementing the class code that you referenced later.
>
>Bob
If it's not broken, fix it until it is.
My Blog