Results 1 to 3 of 3
  1. #1
    WickidWe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    123

    Show Blanks in count as 0

    In the query below(underlined and bold), how do I return the the count as 0 instead of blank?

    SELECT tmp.name, sum(tmp.groupid) AS pick
    FROM (SELECT tblEmpDetails.Name, tblFctnGroup.GroupID, tblRosterRec.Date_, Count(tblRosterRec.EmpId) AS CountOfEmpId FROM ((tblFctnGroup INNER JOIN tblFunctions ON tblFctnGroup.FctnGroup = tblFunctions.FctnGroup) INNER JOIN tblRosterRec ON tblFunctions.ReliefCode = tblRosterRec.FctnID) INNER JOIN tblEmpDetails ON tblRosterRec.EmpId = tblEmpDetails.EmpId WHERE (((tblRosterRec.Date_)<=[Forms]![Form1]![txtDate] And (tblRosterRec.Date_)>=[Forms]![Form1]![txtDate2])) GROUP BY tblEmpDetails.Name, tblFctnGroup.GroupID, tblRosterRec.Date_ HAVING (((tblFctnGroup.GroupID)=1))) AS tmp
    GROUP BY name;

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Try:
    Nz(Count(tblRosterRec.EmpId),0)
    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
    WickidWe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    123
    That Did It! Thanks

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

Similar Threads

  1. Show Count from different Zip Codes
    By jo15765 in forum Queries
    Replies: 6
    Last Post: 04-15-2013, 12:36 PM
  2. Show buttion in form if count of qry >0
    By tcheck in forum Access
    Replies: 1
    Last Post: 03-05-2013, 03:30 PM
  3. Replies: 1
    Last Post: 01-24-2011, 03:03 PM
  4. SQL Update with blanks
    By Tyork in forum Programming
    Replies: 1
    Last Post: 12-17-2010, 10:12 AM
  5. Access filter does not show blanks
    By Jaricketts in forum Access
    Replies: 1
    Last Post: 03-26-2010, 05:38 PM

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