1 2 3 4 5 6
| strsql = "SELECT T_projet.projet AS nomprojet, T_projet.client AS nomclient, Sum(T_projet.montant) AS totmontant," _
& "Nz(DSum('[montant]','[t_projet]','[dateobjet]<Date() AND [projet]=' & [nomprojet] & ' AND [client]=' & [nomclient]),0) AS MontantAnt," _
& "Nz(DSum('[montant]','[t_projet]','([dateobjet] BETWEEN date () and DateSerial(Year(Date()), Month(Date())+1,1) -1) AND [projet]=' & [nomprojet] & ' AND [client]=' & [nomclient]),0) AS MontantPost" _
& " INTO t_synthese_projet" _
& " FROM T_projet" _
& " GROUP BY T_projet.projet, T_projet.client;" |
Partager