Private Sub Form_Load()
Dim sSQL2 As String
Dim oConnect2 As ADODB.Connection
Set oConnect2 = New ADODB.Connection
Dim oRST2 As ADODB.Recordset
Set oRST2 = New ADODB.Recordset
sSQL2 = "SELECT [Produits]FROM [Description produit]'"
oConnect2.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & Form4.txtBaseDe.Text
oRST2.Open sSQL2, oConnect2
Do Until oRST2.EOF
Des_prod.AddItem oRST2("Produits")
oRST2.MoveNext
Loop
End Sub
|