Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box/SQL source
Message
From
25/05/1998 23:38:06
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Combo box/SQL source
Miscellaneous
Thread ID:
00101802
Message ID:
00101802
Views:
72
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?
Next
Reply
Map
View

Click here to load this message in the networking platform