Queries

odomene

New member
Local time
Yesterday, 16:11
Joined
Nov 5, 2008
Messages
7
I'm new to Microsoft access, need help on how to query multiple dates. For example, a table tblAttend has records that has three dates entries for every week.

districtID district SunDate SunAttend
001 wuse 03-jan-08 340
002 wuse 10-jan-08 240
003 wuse 17-jan-08 400
004 wuse 24-jan-08 520
005 wuse 31-jan-08 600

Please how do i sum the values of SunDate in the month of January in a query? I will appreciate any help.:)
 
To get totals use a "Group by" query (click the Zigma button in the menu when you are in query design)

To get the Month of January, look up the Month function in the access help.
 
Thanks Mr. Namliam for that bright idea, but how do i query it to get the result in SQL platform.
 
Uhm? SQL Platform?? What do you mean?

Something like this is what you are looking for.
select month(sundate), sum(sunattend)
from tblAttend
group by month(sundate)
 
Great! the query worked perfectly well. Now how do i convert month in numbers to words. I appreciate your all efforts.
 
Change month(sundate) to Format(sundate, "MMM")
or if you want the full month "MMMM"
 

Users who are viewing this thread

Back
Top Bottom