Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Combo box/SQL source
I want to populate a combo with results from an SQL expression and at the same time set its initial value to match a particular "row" from the SQL result.
eg. I do "SELECT ColDesc, ColCode FROM Colours ORDER BY 1 INTO CURSOR C_Col " as the rowsource for the combo and gives a result of...
Black B
Green G
Red R
and I want to display "Red" as the default.
I don't know in advance that red is the 3rd row, so a can't simply set combo.value to 3. Worse than that the cursor C_Col doesn't exist for some strange reason during the form.init, so I can't do anything there either.
I would've thought that since the combo inits before the form init that C_Col should exist already ???
What's the best way?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement