Question : Feed combo box issue

Hello all,

I have an issue when feeding a combobox.

If i have the same date in the same column, i will see the same date showing many times in my combobox.

I would like to see each text but only once in my combobox.

How can i di this please?

Thanks again for your help.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
'Date available
Dim sSQL3 As String
  Dim oConnect3 As ADODB.Connection
  Set oConnect3 = New ADODB.Connection
  Dim oRST3 As ADODB.Recordset
  Set oRST3 = New ADODB.Recordset


sSQL3 = "SELECT [Période]FROM [Inventaire]'"

oConnect3.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & Form4.txtBaseDe.Text

ComDateDisponible.AddItem ""
oRST3.Open sSQL3, oConnect3
Do Until oRST3.EOF
  ComDateDisponible.AddItem oRST3("Période")
  oRST3.MoveNext
Loop

Answer : Feed combo box issue

change line 9 to read:

sSQL3 = "SELECT DISTINCT [Période]FROM [Inventaire]'"

Matt
Random Solutions  
 
programming4us programming4us