Totalling Calculated Field

databasedonr

Registered User.
Local time
Today, 15:54
Joined
Feb 13, 2003
Messages
163
I've just inherited a database problem -- aren't I the lucky one?! In a project tracking database, we are tracking time spent by employee on a project. For individual projects, we have a query that totals the time each person has spent on this project, as follows:
***********
SELECT Sum(tblHoursActivity.[Working Hours]) AS [SumOfWorking Hours], tblHoursActivity.Department, Last(tblHoursActivity.Dates) AS LastOfDates, tblProject.[Project Title], tblHoursActivity.LastName
FROM tblProject INNER JOIN tblHoursActivity ON tblProject.ProjectID = tblHoursActivity.[Project ID]
GROUP BY tblHoursActivity.Department, tblProject.[Project Title], tblHoursActivity.LastName
HAVING (((tblProject.[Project Title])=[Forms]![frmHoursProject]![cboSearch]));
***********
This query is then used as the basis of a report. The report creates a total number of hours for each person for the project.

What I would like to do is add, in the report footer, a total of all the hours for all the people -- and I am completely lost.

Appreciate any help coming back -- thanks in advance.

databasedonr
 
Thanks Rich, but this gives me #error as a result....
 
Check the spelling of your field as it appears in the field list of your report
 
Nope. It's spelled correctly. If it were only that easy.... Still doesn't work, still returns the #Error. I've even changed the field names to remove the space to make sure I am duplicating the name properly.
 
Last edited:
Here is the stripped down version of the database - -no names show in the report because I haven't included the table. The times - -and the error - come up.

Use the form to launch the report if you like -- the query will prompt you for form, and "Seniors Take Charge" is the project with the most data.

Thanks for taking a look.
 

Attachments

I wasn't able to import either your form or report, I've included a quickly built report.
There are other problems with the tables though:(
 
Last edited:
Thanks -- I see it working there -- I was trying to use the existing report, but obviously it works.

Other problems with the tables - - yes! The database is a bit of a mess -- I'm trying to cobble it together to get it working, but am tempted to start over -- I didn't include all the tables in the sample I posted, but there is duplicated keys, text fields used as foreign keys....

Rich, thanks a bunch for your help. I will try and import it, or, I will simply try and redesign.

Thanks again for the time spent....
 

Users who are viewing this thread

Back
Top Bottom