Rabu, 06 Juli 2016

Re: [MS_AccessPros] Re: Counting dates in a month

 

That almost worked. But I need to put in date order October 2015 through June 2016... Here is what I got right now.

SELECT Format([MOVEINDATE],"mmmm"" , ""yyyy") AS [Month of Move-In], Count(tblTenantListing.ID) AS [Total Move-In]
FROM tblTenantListing
WHERE (((tblTenantListing.MOVEINDATE) Between #10/1/2015# And #6/30/2016#))
GROUP BY Format([MOVEINDATE],"mmmm"" , ""yyyy")
ORDER BY Format([MOVEINDATE],"mmmm"" , ""yyyy") DESC; 

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Anyone who claimed that old age had brought them patience was either lying or senile."  







From: "graham@mandeno.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Tuesday, July 5, 2016 5:06 PM
Subject: [MS_AccessPros] Re: Counting dates in a month

 

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:

Query1
Month of Move-InTotal Move-In
April , 20161
April , 20161
April , 20161
April , 20161
April , 20161
April , 20162
December , 20151
December , 20151
December , 20151
February , 20163
February , 20161
February , 20161
February , 20161
February , 20161
January , 20161
January , 20161
January , 20161
January , 20161
March , 20164
March , 20161
March , 20161
March , 20161
March , 20161
May , 20161
May , 20161
May , 20161
May , 20161
November , 20151
November , 20151
November , 20151
November , 20151
October , 20151

What I actually need is one record per month. Any ideas?

THank you,

Arthur Lorenzini
Sioux Falls, SD


__._,_.___

Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

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