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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with Group Counts 3

Status
Not open for further replies.

deweb

Technical User
Jun 27, 2002
23
US
I have designed a report for my trainings database which is based on a query. The report is grouped by Organizations, then trainings, then the attendees (from that Organization) are listed, something like this:

Organization 1
First Training
Last, First
Last, First
Last, First
Second Training
Last, First
Last, First
Organization 2
First Training
Last, First
Last, First
Third Training
Last, First


My problem is I can't figure out how to count the number of individual organizations that received training (regardless of the number of trainings or attendees), or the total number of trainings received by an individual organization (regardless of the number of attendees). Every count function I use in a group or report footer, (i.e. Count([TrainingID]) just gives me the total number of records in the group or the report.

Any suggestions?

Thanks.


 
To get the total number of organization you can do this.

Add a textbox to the organization header. Set it's Control Source to =1, it's Running Sum property to Over All and it's Visible property to No. Then in the Report Footer add a textbox that has the Control Source set to =RunningSumTextboxName

This will return the last value in the running sum textbox which will be the same as a count.

To get the Total number of Training by an organization, you would do the same thing only put the running sum textbox in the Training Header and set it's Running Sum property to Over Group. Then put a textbox in the Training Group Footer with the control source set to =RunningSumTextboxName

That should do that. Post back if you have problems.

Paul
 
Great answer Paul. Deserves a star.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Have another star! It works great.

Now, how do I get a "grand total" of the trainings into the report footer?

Thanks.

Denise
 
Same way you got the Organization. Put a textbox in the Training header, set the control source to =1 and the Running sum property to Over All. Set the visible property to No. Then in the Report footer set the control source for a textbox to =TrainingRunningSumTextboxName


Paul
 
That makes sense. Thanks again.

Denise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top