I need a SUM of Quantity depending also by date!

  • Thread starter Thread starter amyhens80
  • Start date Start date
A

amyhens80

Guest
Dear Experts,
I am searching the net for a response to my problem but no result;
I have 1 BD access (Facture) in witch there is 2 tables (Entete_Facture and Detail_Facture) with a relation in Field (Numero_Fac).

tables.jpg

It is very easy to use "INNER JOIN" to do a Query (Facture_with_date) fusionning the 2 tables, But I want to add to this query another column : " SUM(Qte_Article) GROUP BY Code_Article " as below:

tableau.jpg

The SUM of Quantity must be also depending by date, then the SUM must chage if I want to print N reports ;
- the first from 01/01/2006 to 31/03/2006
- and the second from 12/04/2006 to 30/04/2006.
- ...etc

Thanks.
 
Last edited:
amyhens80 said:
The SUM of Quantity must be also depending by date, then the SUM must chage if I want to print N reports ;
- the first from 01/01/2006 to 31/03/2006
- and the second from 01/04/2006 to 30/04/2006.
- ...etc

Thanks.

Assuming that you want the factures per month, I would suggest to add
a datepart in your query : DatePart("m",[Date-Facture]), and then
add something like this in your query :

= DSum("[Qte-Art]", "Yourtable", "[Datepart] = 1") , etc.
 

Users who are viewing this thread

Back
Top Bottom