Try this (EXAMPLE) SELECT DISTINCTROW KUNDE.Navn, KUNDE.Måned, DSum("[Salg i kr]","KUNDE","Navn = '" & [Navn] & "' AND Måned <= " & [Måned]) AS Expr1 FROM KUNDE GROUP BY KUNDE.Navn, KUNDE.Måned;
SELECT DISTINCTROW KUNDE.Navn, KUNDE.Måned, DSum("[Salg i kr]","KUNDE","Navn = '" & [Navn] & "' AND Måned <= " & [Måned]) AS Expr1 FROM KUNDE GROUP BY KUNDE.Navn, KUNDE.Måned;
Virker med kriterierne KUNDE.Navn og Kunde.Måned, men hvordan ser SQL ud når der er flere kriterier som der skal akkumukeres ud fra.
change the group by to include your extra fields. Firmanavn and firmastatus will always be the same (I would think) but I'm not sure about product. So if the Kunde has purchased more than one product then you will end up with a line in the resulty for each product. I'm not sure if this is what you want.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.