Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box
Message
De
26/10/1998 08:43:26
 
 
À
26/10/1998 07:56:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00150414
Message ID:
00150433
Vues:
15
>I have on a form an option group and a drop down combo box. The items shown in the drop down combo box are depending on the option chosen in the option group. The row source type of the combo box is 3-SQL Statement. In the interactive change event of the option group I change the SQL statement for the combo box row source accordingly.
>The control source of the drop down combo box is bound to a field in the underlying table of that form.
>
>Everything works fine. If an option is chosen the relevant items only are shown in the drop down combo box. If I click on an item of that list the correct item is saved in the field of the underlying table.
>
>However, when I navigate through the records, only values are shown in the textbox part of the drop down combo box which correspond to the SQL statement of the last chosen option.
>E.g. if the last option chosen was option 3 the values in the text box part of the combo box are only shown for records with have option 3 chosen. In records with option 1 or 2 and so on chosen the text box part of the drop down combo box is empty although the field in the underlying table bound to the drop down combo box has a correct value stored in it
>It seems, that the SQL statement in the row source of the drop down combo box acts like a filter for what is shown in the text box part.
>I wonder if that is inherent to combo boxes used in that context or whether I do something wrong.
>
>I have found some workarounds (e.g put in to the lost focus event of the combo box a SQL statement that selects all options) but none of them are very satisfying.
>
>I am new to VisualFoxPro (coming from Access) and would be grateful for any help or hints in that matter.
>
>Thanks
>
>Josef

That's normal behaviour: drop-down list can store in its Value property (text portion) only values from list portion. You can get much more flexibility (and power) if you don't bind combo.controlsource to table.field, and populate combo.rowsource from cursor.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform