Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COMBO BOX blues
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00118827
Message ID:
00118852
Vues:
18
>Kia,
>
>In the requery method of the second combo put the following code;
>
>
>SELECT ... FROM ... WHERE Field = THISFORM.Combo1.Value INTO CURSOR MyResult
>THIS.RowSourceType = 2 && Alias
>THIS.RowSource = "MyResult"
>THIS.Refresh()
>
>
>That should solve your problem. The reason you are having a problem is that the
>valid event of the first combo runs, it creates an array and then it ends and the array goes out of scope and disappears. Your second combo can't see the array that the first combo built. The solution I recommended is using a cursor and the building of the list for the second combo is IN the seocnd combo and not some other object.


Jim;
Thankyou for your reply. I resolved the issue by trying "one" more thing!!!!
I defined the array as Public in the form's init, which works fine. But I found out that if the array size changes programitcally, the Combo Box 'NumberOfElement' doesn't update, and I must issue a ThisForm.cboMyCombo.NumberOfElemets = ALEN(aMyArray)

Regards

Kia Harirchian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform