Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to reset combobox drop-down list??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00352454
Message ID:
00352458
Vues:
12
>I have a combobox (#1) where I choose a value from its drop-down list. Then, that value is used in a SELECT SQL statement to build the combobox (#2s)drop-down list. I can successfully choose a value in both comboboxes and save the value. That all works.
>
>But The problem I am having is that if I go back to combobox (#1) and choose a different value or even the same value from combobox (#1s) drop-down list, it's as if the combobox #2 drop-down list is no longer showing the correct number of drop-down items. It only seems to show the correct number of items the first time I do the SELECT SQL in combobox #1 to populate combobox #2.
>
>It's as if the combobox (#2) needs to be reset before the combobox (#1) SELECT SQL runs again, or I don't get what I want in the combobox (#2) drop-down list.
>
>What would be the best way to reset combobox (#2) so it always shows the proper result from the combobox (#1) chosen value?
>
>I hope I didn't confuse you.

Hi Steve,

If the second ComboBox control has its RecordSource bound to a parameterized view, with the parameter as the desired value from the first ComboBox control, then all you would need to do when a user selected a value from ComboBox #1 is to set the parameter to the desired value, REQUERY() the parameterized view, and Refresh() the second ComboBox.

HTH.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform