[RESOLVED] How to get unique values in comboboxes
I'm adding valus to a combo box from a table column in a database. The values in the column are not unique meaning there are rows with same values. I would like th combobox to only have one of each value. Can anyone help? I'm using the code below.
VB Code:
With OraDynaset
If .RecordCount <> 0 Then
Do While Not .EOF
cboDefLine.AddItem .Fields("Line_ID")
.MoveNext
Loop
End If
Re: How to get unique values in comboboxes
Is there no way the SQL for the combo could just return unique values ? Much simpler that way..
Chubby..
Re: How to get unique values in comboboxes
Use SELECT DISTINCT in your sql...