Totalling up in a Query

M

MYL

I ran a Query on the 3 tables, Company Enrolment, Delegate Registration and
Event Attendance showing Event ID, Full Name, Company and Town. I want to
find out from which towns the attendees came from and how many from each
town. I have only managed to create a Report showing delegates grouped
according to towns. Is it possible to also total them up so that instead of
having to count 35 from a town for example, there is already a figure saying
35 at the bottom of the list?
 
J

Jeff Boyce

Consider a slightly different approach. It sounds like your query is
generating the "detail" information. Now you can create a report, using
that detail, and count the group's records.

One way to do this is to add a control in the Group Header (or Footer) and
set the Control Source property to something like:

= Count([Full Name])

If your query/report has more than one group, you'd get the count for each
group.

Regards

Jeff Boyce
<Access MVP>
 
J

Jeff Boyce

Open the report in design mode.

Make sure you have a Group Header AND a Group Footer.

Make sure your toolbar is available.

Select the textbox control -- add it into the Group Footer section.

In the new control's ControlSource property, add something like (your syntax
may vary):
=Count([SomeField])
where "SomeField" happens once per record in the report's Detail section.


--
Regards

Jeff Boyce
<MS Office/Access MVP>
MYL said:
How do I add a control in the Group Header? I'm quite new to access so
haven't a clue!

Jeff Boyce said:
Consider a slightly different approach. It sounds like your query is
generating the "detail" information. Now you can create a report, using
that detail, and count the group's records.

One way to do this is to add a control in the Group Header (or Footer) and
set the Control Source property to something like:

= Count([Full Name])

If your query/report has more than one group, you'd get the count for each
group.

Regards

Jeff Boyce
<Access MVP>
 
M

MYL

I tried to create a report from the query 'Event 20 - where the attendees
come from' with a control in the Group Footer but for some reason it shows
attendees at other events too....

Jeff Boyce said:
Open the report in design mode.

Make sure you have a Group Header AND a Group Footer.

Make sure your toolbar is available.

Select the textbox control -- add it into the Group Footer section.

In the new control's ControlSource property, add something like (your syntax
may vary):
=Count([SomeField])
where "SomeField" happens once per record in the report's Detail section.


--
Regards

Jeff Boyce
<MS Office/Access MVP>
MYL said:
How do I add a control in the Group Header? I'm quite new to access so
haven't a clue!

Jeff Boyce said:
Consider a slightly different approach. It sounds like your query is
generating the "detail" information. Now you can create a report, using
that detail, and count the group's records.

One way to do this is to add a control in the Group Header (or Footer) and
set the Control Source property to something like:

= Count([Full Name])

If your query/report has more than one group, you'd get the count for each
group.

Regards

Jeff Boyce
<Access MVP>
 

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

Similar Threads


Top