Bonjour
en cherchant sur les forums de ce site, vous trouverez un petit bout de code pour creer une connection avec un BDD.
ensuite :
dim SQL as string
dim RecordstSQL as recorset
SQL = SELECT Fonde,Code,Libelle,LibFonde From VStatRecl
where DateRecl
BETWEEN #" & Trim(DTPDebut.Value) & "# and #" & Trim(DTPfin.Value) & "#
Set RecordstSQL = db.OpenRecordset(SQL, dbOpenDynaset)
do while RecordstSQL.eof = false 'tant qu il y a des lignes, on lit
Valeur = RecordstSQL.fields("Fonde")
etc ....
RecordstSQL .movenext 'on passe a la ligne suivante
loop