Results 1 to 2 of 2
  1. #1
    Hursan is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2021

    Query return zero counts

    I have a query that returns all DeIDBased with at least one record, but I have some DeIDBased that have no records, I would like my query to return all DeIDBased even those without records, right now I have 429 DeIDBased, out of those 299 have 1 or more records, the query only returns 299 results, i would like to see all 429 but display zero or blanks if a DeIDbased does not have a record.

    This is my SQL:

    SELECT SATTotalBreakdown.DeIDBased, Count(SATTotalBreakdown.DeID) AS CountOfDeID, Count(SATTotalBreakdown.CollectioDate) AS CountOfCollectioDate, Count(SATTotalBreakdown.ShipDate) AS CountOfShipDate

    FROM SATTotalBreakdown

    GROUP BY SATTotalBreakdown.DeIDBased;

    Screenshot attached
    Thanks in advance.

    Enable GingerCannot connect to Ginger Check your internet connection
    or reload the browserDisable in this text fieldEditEdit in GingerEdit in Ginger×
    Attached Thumbnails Attached Thumbnails Query1.PNG  

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    Typically you would add the table containing the DeIDBased items, joining on that field. Edit the join to return all records from that table.
    Paul (wino moderator)
    MS Access MVP 2007-2019

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

Similar Threads

  1. Multiple counts in a query
    By Bentley in forum Queries
    Replies: 4
    Last Post: 10-02-2018, 05:08 PM
  2. Query to get unique counts
    By jakeman in forum Access
    Replies: 3
    Last Post: 02-15-2013, 11:34 PM
  3. Query - Counts
    By maxx102 in forum Access
    Replies: 1
    Last Post: 12-14-2012, 12:49 PM
  4. Query Not Returning Zero Counts
    By TimMoffy in forum Queries
    Replies: 3
    Last Post: 07-05-2012, 10:08 PM
  5. Reporting counts in another query...maybe?
    By Geewaagh in forum Queries
    Replies: 7
    Last Post: 06-04-2010, 07:39 PM

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 - Senior Forums