Results 1 to 6 of 6
  1. #1
    ShostyFan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    76

    grouping and summing query

    I have a table that stores a physical inventory count. Users scan products into the table with a default quantity of 1, so if there are three items, the product will be scanned 3 times.


    I have been exporting the data into excel and doing a sumif but I want a query to do this for me. Ideally, the query will sum the quantities for each unique date. Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Have you tried to build an aggregate query with the query builder? Or build a report using its Sorting & Grouping features with aggregate calcs in group and report footers? Access Help has guidelines or search web.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ShostyFan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    76
    I would like the results to be in a query, and I have done the aggregate query but the date seems to be using the time as well so everything is unique. at least that is what I think is going on, or it could just not be working. I thought I would throw my post/problem out to see what others have done, seems like a solved problem but I could not find something that made sense on the "internet".

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    You may have some issues with Access if your background is Excel. Database is different than spreadsheet.

    See this article re Inventory and stock taking for basic concepts.

    Access Date() function shows date only; Now() function shows date and time

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Extract the date portion from value and apply filter or grouping criteria to that constructed field.

    CDate(Format([fieldname], "mm/dd/yyyy"))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    ShostyFan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    76
    that worked exactly as desired, thanks June7.

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

Similar Threads

  1. Replies: 5
    Last Post: 04-07-2015, 02:20 PM
  2. Summing Multiple Queries & Summing Time
    By WEJ in forum Queries
    Replies: 2
    Last Post: 10-04-2013, 04:46 PM
  3. A summing query?
    By russweb in forum Queries
    Replies: 8
    Last Post: 03-26-2012, 06:57 PM
  4. Grouping, Summing, and Ranking Problem
    By cadsvc in forum Reports
    Replies: 3
    Last Post: 04-16-2011, 11:34 AM
  5. summing in a query
    By nparrillo in forum Queries
    Replies: 1
    Last Post: 04-11-2011, 10:37 AM

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