Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904

    Try this:
    It looks like you won't even need to use the NZ function
    Code:
    SELECT SC.Merchant, Count([NAME],0) AS MerchantCount
    FROM SC LEFT JOIN TOI ON SC.Merchant = TOI.NAME
    GROUP BY SC.Merchant
    HAVING (((SC.Merchant)="Photo"));

  2. #17
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Shazam! That one did not work, but a little tweak and this one now works

    SELECT SC.Merchant, Count(TOI.[NAME]) AS MerchantCount
    FROM SC LEFT JOIN TOI ON SC.Merchant = TOI.NAME
    GROUP BY SC.Merchant
    HAVING (((SC.Merchant)="Photo"));

    Now I get the 0 I wanted. Your hand holding is appreciated!

    Thanks!

  3. #18
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Whoops, I had copied your code and was working off of that, and forgot to remove the ",0" when I removed the NZ function.
    Just seeing if you were paying attention!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 03-03-2013, 02:53 PM
  2. Replies: 6
    Last Post: 10-20-2012, 04:45 PM
  3. Setting default value for all records in form
    By robsworld78 in forum Forms
    Replies: 15
    Last Post: 08-14-2011, 12:48 AM
  4. Form Field Default Setting
    By roofbid in forum Programming
    Replies: 3
    Last Post: 12-17-2010, 10:53 AM
  5. Set the default field for form veiw
    By amer in forum Database Design
    Replies: 2
    Last Post: 06-16-2010, 11:32 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