Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox
Message
De
05/04/2003 14:17:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
ComboBox
Divers
Thread ID:
00774452
Message ID:
00774452
Vues:
49
Hi All,

I have table called "Items" consist of the following...

Id Desc
1 Apple
2 Orange
3 Pear
4 Grape
6 Lemon
7 Peach
9 Mango

I populate all data in the init() with the following code...

FOR I = 1 to RECCOUNT()
ThisForm.cmbo_Item.AddListItem(alltrim(Desc),I,1)
ThisForm.cmbo_Item.AddListItem(alltrim(str(Id)),I,2)
ENDFOR

Noticed that Id #5 and #8 are deleted. The cmbo_Item column is currently bound to 1 (Desc) and the controlsource is set to items.Id. The problem is when I viewed the item with Items.ID > 4, it's showing the value of that ListIndex which is incorrect. For Example, If Items.Id I stored in a separate table happens to be 6. It's showing Peach as the description instead of Lemon. How could I solved this problem? TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform