Hi Art
Remove tblTenantListing.MOVEINDATE from the GROUP BY. Having it there causes a new aggregate record for every different date.
You will probably also need to change HAVING to WHERE.
Best regards,
Graham Mandeno [Access MVP 1996-2015]
---In MS_Access_Professionals@yahoogroups.com, <dbalorenzini@...> wrote :
I am trying to count the number of records by month.
SELECT Format([MOVEINDATE],"mmmm"" , ""yyyy") AS [Month of Move-In], Count(tblTenantListing.ID) AS [Total Move-In]
FROM tblTenantListing
GROUP BY Format([MOVEINDATE],"mmmm"" , ""yyyy"), tblTenantListing.MOVEINDATE
HAVING (((tblTenantListing.MOVEINDATE) Between #10/1/2015# And #6/30/2016#));
Currently this gives me the following:
Month of Move-In | Total Move-In |
---|---|
April , 2016 | 1 |
April , 2016 | 1 |
April , 2016 | 1 |
April , 2016 | 1 |
April , 2016 | 1 |
April , 2016 | 2 |
December , 2015 | 1 |
December , 2015 | 1 |
December , 2015 | 1 |
February , 2016 | 3 |
February , 2016 | 1 |
February , 2016 | 1 |
February , 2016 | 1 |
February , 2016 | 1 |
January , 2016 | 1 |
January , 2016 | 1 |
January , 2016 | 1 |
January , 2016 | 1 |
March , 2016 | 4 |
March , 2016 | 1 |
March , 2016 | 1 |
March , 2016 | 1 |
March , 2016 | 1 |
May , 2016 | 1 |
May , 2016 | 1 |
May , 2016 | 1 |
May , 2016 | 1 |
November , 2015 | 1 |
November , 2015 | 1 |
November , 2015 | 1 |
November , 2015 | 1 |
October , 2015 | 1 |
What I actually need is one record per month. Any ideas?
THank you,
Arthur Lorenzini
Sioux Falls, SD
__._,_.___
Posted by: graham@mandeno.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar