Bewtween Date(), SUM

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two needs:

I have a database set up to list all training data for the year. I want to
pull up all names that need training for the month of December. I put in the
calculation:
Between Date(12/01/04) And Date(12/31/04) and nothing comes up or I get an
error.

I also have a list of yearly training. I have many entries for Smith, Joe,
when he completes an inservice I enter into the database. I list, Name,
Inservice Title, Date and Hours. How can I create a query that will let me,
not list all the training that he has by topic name, but add the hours up for
all his training and list it into a seperate column. What I want is to be
able to print up a sheet that lists all employee names and how many total
hours of training to that point and that's all.

thanks, I hope I gave enough information.
 
I have two needs:

I have a database set up to list all training data for the year. I want to
pull up all names that need training for the month of December. I put in the
calculation:
Between Date(12/01/04) And Date(12/31/04) and nothing comes up or I get an
error.

The Date() function takes no arguments, and returns today's date. Just
put the literal date in the query delimited by #:

BETWEEN #12/1/04# AND #12/31/04#

or, better, use

BETWEEN [Enter start date] AND [Enter end date]

Put the prompts [Enter start date] and [Enter end date] into the
Query's Parameters collection - right mouseclick the table background
and choose Parameters.
I also have a list of yearly training. I have many entries for Smith, Joe,
when he completes an inservice I enter into the database. I list, Name,
Inservice Title, Date and Hours. How can I create a query that will let me,
not list all the training that he has by topic name, but add the hours up for
all his training and list it into a seperate column. What I want is to be
able to print up a sheet that lists all employee names and how many total
hours of training to that point and that's all.

Surely you have a unique EmployeeID? Names are NOT unique - do you
mean Joe Smith the copier repairman, or Joe Smith the executive VP?
<g>

A Totals query will do this. Create a Query based on your table; click
the Greek Sigma icon (looks like a sideways W). Group By the Name and
Title, change the default Group By to Where under the date field, and
change it to Sum under the hours field. Note also - Date is a reserved
word, as is Name; neither should be used as fieldnames.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top