stevekos07
Registered User.
- Local time
- Today, 03:38
- Joined
- Jul 26, 2015
- Messages
- 174
I have a frustrating problem. I have a table of clients (ClientID) and dates they are called (CallDate). The table is an Update table populated from daily backups. So I have a list of every client and every date that each has received a call.
I want to generate a report that summarises how many calls each client received throughout the month, each month.
I have created the query with all of the data, and sorting by ClientID I can show a count of dates called for each client. However if I attempt to filter the date range with a Between...And... parameter I get a "too complicated" error. It is obviously the parameter which messes with the Count sort on the CallDate field.
This runs ok:
SELECT tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID, Count(tblDailyStatsBackup.CallDate) AS CountOfCallDate
FROM tblDailyStatsBackup
GROUP BY tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID
But this doesn't:
SELECT tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID, Count(tblDailyStatsBackup.CallDate) AS CountOfCallDate
FROM tblDailyStatsBackup
GROUP BY tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID
HAVING (((Count(tblDailyStatsBackup.CallDate)) Between [Enter Start Date] And [Enter End Date]));
Any thoughts on how I can deal with this?
I want to generate a report that summarises how many calls each client received throughout the month, each month.
I have created the query with all of the data, and sorting by ClientID I can show a count of dates called for each client. However if I attempt to filter the date range with a Between...And... parameter I get a "too complicated" error. It is obviously the parameter which messes with the Count sort on the CallDate field.
This runs ok:
SELECT tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID, Count(tblDailyStatsBackup.CallDate) AS CountOfCallDate
FROM tblDailyStatsBackup
GROUP BY tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID
But this doesn't:
SELECT tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID, Count(tblDailyStatsBackup.CallDate) AS CountOfCallDate
FROM tblDailyStatsBackup
GROUP BY tblDailyStatsBackup.MavisID, tblDailyStatsBackup.ClientID
HAVING (((Count(tblDailyStatsBackup.CallDate)) Between [Enter Start Date] And [Enter End Date]));
Any thoughts on how I can deal with this?