>>There's no such thing in VFP as a record position in an index. What do you need it for?
>>
>>
>>>I have a table, with two indexes. (In a cdx file)
>>>
>>>I need to know the new place in the table when the order changes.
>>>ie if it is the second record in the table in sort order #1, what is it
>>>in order #2.
>>>
>>>Let say that in order 1 it is the 2nd record, but in order #2 it would
>>>be the fifth record.
>>>How do I find out when I switch order, what position it's in?
>>>
>>>Can't use recno(), what other functions is there.
>>>Mike
>It's actually a cursor that has two sorts... as stated above.
>
>I then have a control that lists them. (Custom as it is for a touch screen.)
>When I populate the control, I go through the list, using the recno in naming the individual items.
>Thus the 2nd record becomes object #2, when it is orginally sorted. ie the object is object2
>When it is sorted in the other order, it might be object5 (if it is in the fifth position.) however since the recno is 2, my list still thinks its in second place.
>
>I will add a field to the underlying cursor to hold a number independant of the cursor that I will populate after the sorts.
>Thanks,
>mike
Maybe you can just do a SQL-SELECT command with ORDER set instead.
SELECT * FROM your_table ORDER BY your_order INTO CURSOR your_cursor
then you can always use RECNO() for that purpose.
Regards,
Ony