>>>I am using a cursor for the recordsource of one of my grids. In the header click events I am creating a IDX index to sort the records in the grid which works great, but for some reason I can't get the cursor to hold more than one IDX file. Is this the normal for a cursor to only hold one IDX, or am I doing something wrong? Also if I set the order of the IDX to (DESC) it works fine, but I have to create the IDX index once again to reorder it to ASC. Any help greatly appreciated!!
>>>
>>>Thanks.
>>>
>>>John.
>>
>>
>>Try creating tags in a structural CDX file as an alternative. And, maybe, when the cursor is created create the tags you will need as well....in the header click method, just switch tags then.
>>
>>IE:
>>
>>CREATE CURSOR test (name C(50), address C(50), dob D, member L)
>>INDEX ON name TAG name
>>INDEX ON address TAG address
>>INDEX ON dob TAG dob
>>INDEX ON member TAG member
>>
>>*** The structural CDX is implied and created when you create the first tag.
>>
>>
>>In the Header click:
>>
>>SET ORDER TO TAG {whatever appropriate}
>
>John,
>Pretty nice. An addition to make it easier :
>
CREATE CURSOR test (name C(50), address C(50), dob D, member L)
>for ix=1 to fcount()
> if !type("field(ix)")$"MG"
> cKey = field(ix)
> index on &cKey tag (field(ix))
> endif
>endfor
>
>*Header click
>SET ORDER TO TAG {varread()}
>this.refresh
>Cetin
Oooops. Correction. No quotes in type("field(ix)") -type(field(ix))-
Cetin