Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2008
    Posts
    7

    A months query

    On the basis of my query i have built a totals query as follows:
    SELECT Sum(qryMargin.MarginInvoice) AS SumOfMarginInvoice, qryMargin.invoicedate
    FROM qryMargin


    GROUP BY qryMargin.invoicedate;

    I want to break down the sum so obtained into months on the basis of the invoicedateand also to arrange them to be not in
    alphabetical order but following the order of the months, e.g. january,february,march etc
    Can you help me ?

  2. #2
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109
    Just add a Format around your invoice date in your Select and a Month in your Group By.

    Code:
    SELECT Sum(qryMargin.MarginInvoice) AS SumOfMarginInvoice, Format(qryMargin.invoicedate,"mmm") 
    FROM qryMargin 
    GROUP BY Month(qryMargin.invoicedate);

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums