General information
Category:
Coding, syntax & commands
Title:
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?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only