Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting totals

Status
Not open for further replies.

rgaetos

IS-IT--Management
Jun 14, 2006
63
US
It seems like I'm having the most trouble getting totals in both reports and in a form. I have a stepped report that lists volunteers then the activities that have participated in. I am trying to get the total volunteer count, but it is counting every activity in the report rather than just the volunteers. The code I am using is:
=Count([VoulnteerID])

The other problem I am having is getting total volunteer hours on my main form. My main form shows all volunteer information and has a subform that list their volunteer actvities and individual volunteer hours(VolunteerHours). On the main form =Count([VoulnteerID]) works to get the total number of volunteers, but when I add another field to sum total volunteer hours both show #error. the code I have for the total volunteer hours is:
=Sum([VolunteerHours])
Any tips on getting totals??
 
Re Totals on Main Form - I have somethng similar.

I have a text box (txtHours) on the subform with the following Control Source "=Sum([hours])", with the visible property set to no. This sums the total hours worked by an employee.

On the main form I have another text box (txtTotal) with the following control source "=Hours.Form!txtHours" where:
Hours is the Name of the subform and the Form!txtHours references the control on the subform.

HTH
 
I've done that also ^^ but I am trying to get a total hours for all records to be displayed, not just for the current record.

I was wondering if the control source "=Hours.Form!txtHours" from above could be entered into a table corresponding to the employeeID then summed up pulling it from there...does that make any sense?

Does the sum function somehow interfere with the count functin on the form? Everyime I try to use the sum function in a textbox along with the count function on another textbox I get #error displayed in both.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top