Summing totals in a query

G

Guest

Hi,

I have a query thats returns specific entries in a table with a few project
and Hour fields. A user is able to choose from a list of projects for each
field. I want to count the amount of hours for each project. Lets say I have
the following (This is the result of my query):

Name ProjectsA HoursA ProjectsB HoursB

User1 Project1 3 Project2 5
User1 Project2 2 Project2 3
User1 Project1 1 Project2 7

Now, I want the totals (preferably in a report)

Projects TotalHours

Project1 4
Project2 17


How do I do this?

Thanks!
R
 
G

Guest

Hi, Rudy.

The most general way to do this is with a Totals query. Switch to Totals
view with View, Totals, and select the Project and Hours fields. In the
Total: row, set Project to "Group By" and Hours to "Sum", which will create a
total for each project. If you have selection criteria, drag those fields to
the grid and set their Total: row to "Where"; then specify the criteria,
which could be a reference to your form, e.g.,

=Forms!MyCriteriaForm!MyCriteriaField

Hope that helps.
Sprinks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top