Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a Combo Box value as a paramater to another ComboB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00782038
Message ID:
00782041
Vues:
13
Gerard, what you're doing can be tricky. One suggestion (when adding records) is to disable CboBox2 and in the InterActiveChange Event of CBoBox1 enable CboBox2, set its RowSource and Requery() it. For editing records, you'll have to check whether CboBox1 has an appropriate value and enable/disable CboBox2 accordingly.

Another suggestion is to render CboBox2 invisible unless a valid value exists for CboBox1. If the correct value is chosen for CboBox1 interactively, use the InterActiveChange Event of CboBox1 to set the RowSource of CboBox2, Requery() it and make it visible. IF a correct value for CboBox1 exists on form Init(), make it visible then.

The dependency between the combo boxes (or any objects) underscores some of the complexity of event-driven programming, where users can click anywhere at any time and our interfaces have to be able to handle it.

John
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform