Dim sSQL3 As String
Dim oRST3 As ADODB.Recordset
Set oRST3 = New ADODB.Recordset
Dim oConnect3 As ADODB.Connection
Set oConnect3 = New ADODB.Connection
sSQL3 _
= " SELECT [Période],[Description_du_produit],[Quantité_distribuée]" _
& " FROM [Inventaire]" _
& " WHERE Période = '" & ComDateDisponible.Text & "'" _
& " AND Description_du_produit = '" & Des_prod.Text & "'"
oConnect3.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & Form4.txtBaseDe.Text & ";"
oRST3.Open sSQL3, oConnect3
If Des_prod > "" Then
oRST3.Filter = "Quantité_distribuée"
End If
|