The query below adds up how may policies have been submitted per business origin. e.g. Referral, Repeat Customer, Advert.
I would like to include all Policy Origins even if the result is Zero.
I've been searching solutions in ee and kinda think that I need Nz somewhere in the SQL but after several experiments can't figure out where to put it.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT tblPolicyOrigin.Origin,(Count(qryPolicyNoDate.PolicyID) AS Total
FROM qryPolicyNoDate RIGHT JOIN tblPolicyOrigin ON qryPolicyNoDate.OriginID = tblPolicyOrigin.OriginID
WHERE (((qryPolicyNoDate.DateSubmitted) Between [Enter Start Date] And [Enter End Date]))
GROUP BY tblPolicyOrigin.Origin;