More Access...
I have chart in a report thats based on a query that counts the amount of entries per month between two dates inputted by the user.
It all works fine but the chart that is based on the query only shows months that have an entry.
Eg if it counts all dates between the two dates and say the only month that has an entry is July, the chart will only show July. What I want is the other months to show (Null values) as zero, so every month shows.
[TextPriDate] is the start date
[TextPriDate2] is the end date
This is the query code (QryDate)
Code:
SELECT
tblMain.ID1, tblMain.Dt
FROM
tblMain
WHERE
(((tblMain.Dt) Between [Forms]![frmSwitchboard]![TextPriDate] And [Forms]![frmSwitchboard]![TextPriDate2]));
This the code from the chart in the ReportCode:
SELECT
(Format([Dt],"MMM 'YY")) AS Expr1, Count(*) AS [Count]
FROM
QryDate
GROUP BY
(Format([Dt],"MMM 'YY")), (Year([Dt])*12+Month([Dt])-1);
I've tried a few variations on the coding but I suppose working with null values is like trying to create something out of nothing.
Theres 18 records July which shows fine but the other months there are currently no records, but I want to show them as zero on the chart.
Casp