Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limiting choice in drop down list
Message
 
À
06/10/1998 16:21:21
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00143999
Message ID:
00144428
Vues:
26
>this.clear
>
>SELECT (this.crowsource)
>GO TOP
>i = 1
>
>SCAN
> IF EVALUATE(this.cexcludefield)
> *-- true
> this.additem(EVALUATE(this.cdisplayfield), i, 1)
> this.additem(EVALUATE(this.ckeyfield), i, 2)
> ELSE
> this.additem("\" + EVALUATE(this.cdisplayfield), i, 1)
> this.additem(EVALUATE(this.ckeyfield), i, 2)
> ENDIF
>
> i = i + 1
>ENDSCAN
>
>DODEFAULT()

Bob,

You need to change the i = 1 to i = THIS.NewItemID + 1

and the i = i + 1 to i = THIS.NewItemId + 1

This sinecessary because the combo does not reset the itemids, rather it continues to count forward in the assignment. This will be especially noticed if the combo is sorted, things will show up in the wrong places.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform