Results 1 to 3 of 3
  1. #1
    kraftk is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    4

    Column total based on date

    Im trying to build the below query and sum up the qshipped column based on 3 months sales 6 months and 12 months sales all in separate columns and each individual WHS/Product. How can this be accomplished. I am able to sum up the qship column but it groups it by the refdate which I don't want. Any help would be appreciated.



    Thanks



    Click image for larger version. 

Name:	Capture.JPG 
Views:	9 
Size:	32.8 KB 
ID:	35975

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    and remove your GROUP BY in the date range, make it a WHERE
    and you still need a SUM field.

    for date math use:
    DateAdd("d",-2,Date())

    or
    DateDiff(..)

  3. #3
    kraftk is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    4
    Quote Originally Posted by ranman256 View Post
    and remove your GROUP BY in the date range, make it a WHERE
    and you still need a SUM field.

    for date math use:
    DateAdd("d",-2,Date())

    or
    DateDiff(..)
    Thanks i think i got it now. One last question. i want to be able to sum up the qship based on the number of months from todays date but be able to enter the date into a paramater pop up window. What date formula should i be using?

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

Similar Threads

  1. Replies: 4
    Last Post: 12-29-2015, 03:25 PM
  2. Dcount to return total based on date field
    By Integrate in forum Macros
    Replies: 2
    Last Post: 03-04-2015, 04:07 PM
  3. Running Total Based on a Date in a field
    By scratchmb in forum Access
    Replies: 4
    Last Post: 02-15-2012, 05:31 PM
  4. Remove duplicates based on date in another column
    By mlhend2002 in forum Programming
    Replies: 5
    Last Post: 12-26-2011, 01:47 PM
  5. Replies: 1
    Last Post: 04-15-2010, 02:07 AM

Tags for this Thread

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