Kamis, 30 Juni 2011

RE: [MS_AccessPros] Monthly Count

 

Art-

Do you have activities in February for LearningCenterID 1?

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art
Sent: Thursday, June 30, 2011 7:41 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Monthly Count

I have the following query that returns a count based on activity dates by the
month:

SELECT Count(tblLearningCenterClientActivities.StudentID) AS [Total Students],
Format(Month([ActivityDate]),"mmmm") AS [Month of Activity]
FROM tblLearningCenterClientActivities
WHERE (((tblLearningCenterClientActivities.ActivityDate)>#1/1/2011#))
GROUP BY Format(Month([ActivityDate]),"mmmm"),
tblLearningCenterClientActivities.LearningCenterID
HAVING (((tblLearningCenterClientActivities.LearningCenterID)=1));

But it only returning a count in January even though I know there are activities
in feburary. Confused!!!

Thanks
Art Lorenzini
Sioux falls

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar