Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box/SQL source
Message
De
25/05/1998 23:38:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Combo box/SQL source
Divers
Thread ID:
00101802
Message ID:
00101802
Vues:
71
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
Fil
Voir

Click here to load this message in the networking platform