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"));
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"));
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!
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!![]()