Jim,
Thanks, I never realized this. Couple questions though....
I decided to use a OptionGroup to control the order. When the FORM init's I wanted to add the following
to the INIT method but I get a FUNCTION, PARAMETER ERROR on the DESCENDING line.
IF DESCENDING("idxDATE")
thisform.oSort.oldest.value=1
else
thisform.oSort.newest.value=1
endif
What am I missing? I tried moving it also to the INIT of the optiongroup but I get the same error.
My second problem:
I modified the INTERACTIVECHANGE for the OptionGroup "osort" to read
IF this.Oldest.value=1
SET ORDER TO idxDATE ASCENDING
ELSE
SET ORDER TO idxDATE DESCENDING
ENDIF
thisform.listEntry.requery
GO TOP
thisform.REFRESH
This works fine except (always have to have an except) the GO TOP. Shouldn't that cause the record pointer
to jump back to the TOP of the listbox or in this case, the first record depending on the sort order? That
doesn't do it.
Thanks
>Peter,
>
>Indexes in VFP are always in only one order. The ascending or descending sequence just controls the way VFP reads the index. For your situation, assuming your index tag is named DateOrder, you would in y9our button's click event;
>
>
>* Button's click
>IF DESCENDING("DateOrder")
> SET ORDER TO DateOrder ASCENDING
>ELSE
> SET ORDER TO DateOrder DESCENDING
>ENDIF
>
Peter Brama
West Pointe Enterprises
VFP is getting easier but STILL alot to learn!!