Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto check for existing index
Message
De
14/10/2000 17:05:19
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00429490
Message ID:
00429544
Vues:
13
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!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform