Function T_Tdb(deb As Double, fin As Double) As Variant
Req = "SELECT `Désignation`, `Référence`, `machine`, `Identification machine`, " & _
" COUNT(`Désignation`) AS `Nb`, MAX(`prix unité`) as `prix_unité`" & _
" FROM " & Bddo & _
" WHERE `Date de demande` BETWEEN " & deb & " AND " & fin & _
" GROUP BY `Désignation`, `Référence`, `machine`, `Identification machine`" & _
" ORDER BY `Désignation`"
Connect_xls ThisWorkbook.FullName
T_Tdb = Select_Db
Close_Cnx
End Function