F
Flopbot
Thanks in advance to anyone who can help here! From what I’ve read so far, I
want to create a “Parameter Queryâ€. My current query (SQL below) groups the
total hours volunteered in several departments by month. When run, it
returns all the results going back to the beginning of my database. I would
like to have the query prompt me with [What month & year?]. Just so you know
I don’t really understand what SQL is or how it works but I at least know
where to find it.
Current Query SQL:
SELECT DateSerial(Year([Date Worked]),Month([Date Worked]),1) AS [Month],
(Sum((DateDiff("n",[Start Time],[End Time])/60)*[Number of People])) AS
Total, [Volunteer Hours Tracking Table].Department
FROM [Volunteer Hours Tracking Table]
GROUP BY DateSerial(Year([Date Worked]),Month([Date Worked]),1), [Volunteer
Hours Tracking Table].Department
ORDER BY DateSerial(Year([Date Worked]),Month([Date Worked]),1) DESC;
Example Data:
Jun. 2009 ~ 10 ~ Education
Jun. 2009 ~ 10 ~ Exhibits
Jun. 2009 ~ 10 ~ Admissions
Apr. 2009 ~ 5 ~ Education
Apr. 2009 ~ 5 ~ Exhibits
Apr. 2009 ~ 5 ~ Admissions
What I want it to return when prompted for “June 2009â€:
Jun. 2009 ~ 10 ~ Education
Jun. 2009 ~ 10 ~ Exhibits
Jun. 2009 ~ 10 ~ Admissions
want to create a “Parameter Queryâ€. My current query (SQL below) groups the
total hours volunteered in several departments by month. When run, it
returns all the results going back to the beginning of my database. I would
like to have the query prompt me with [What month & year?]. Just so you know
I don’t really understand what SQL is or how it works but I at least know
where to find it.
Current Query SQL:
SELECT DateSerial(Year([Date Worked]),Month([Date Worked]),1) AS [Month],
(Sum((DateDiff("n",[Start Time],[End Time])/60)*[Number of People])) AS
Total, [Volunteer Hours Tracking Table].Department
FROM [Volunteer Hours Tracking Table]
GROUP BY DateSerial(Year([Date Worked]),Month([Date Worked]),1), [Volunteer
Hours Tracking Table].Department
ORDER BY DateSerial(Year([Date Worked]),Month([Date Worked]),1) DESC;
Example Data:
Jun. 2009 ~ 10 ~ Education
Jun. 2009 ~ 10 ~ Exhibits
Jun. 2009 ~ 10 ~ Admissions
Apr. 2009 ~ 5 ~ Education
Apr. 2009 ~ 5 ~ Exhibits
Apr. 2009 ~ 5 ~ Admissions
What I want it to return when prompted for “June 2009â€:
Jun. 2009 ~ 10 ~ Education
Jun. 2009 ~ 10 ~ Exhibits
Jun. 2009 ~ 10 ~ Admissions