KB-57024: Loading into a combo box all values from a Database column.

Question:

How can all the values from a Database column be loaded into a combo box?

Solution:

To perform this command, you must use GetADORecordset method in one of your Database’s Query. The following script shows how to use this query and store the values in a combo box:

‘Clears the ComboBox
Clear()

‘Retrieves data from the Query
set RS = Screen.Item(“Query1”).GetADORecordset()

‘Adds all records found in the ComboBox
for i=1 to RS.RecordCount
AddItem RS.Fields(“Name”).Value
RS.MoveNext
Next

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *