Split Query Result - How to combime them together?

V

Vincent

How do you NOT display a field when the record is not selected?

School Name: AAA BBB CCC DDD or ALL Schools


when i select AAA, the result would be only:


Student: GPA School Name
Tom 3.5 AAA
Chris 2.0 AAA


when i select all school, this is what it appears:


Student: GPA School Name


Tom 3.5 AAA
Tom 3.0 BBB
Tom 3.5 CCC
Nick 2.0 DDD
Chris 3.5 BBB
Chris 2.0 AAA


what I WANT is:


Student: GPA School Name


Tom 3.33 ALL Schools
Nick 2.0 ALL Schools
Chris 2.75 ALL Schools


How to i set up the query so that I can get the result?
 
K

kingston via AccessMonster.com

What you've described is a totals query. Create a query and click the totals
button (looks like a sideways M). Use the fields Student and GPA. In the
totals section, group by Student and select Avg for GPA. Do not add the
school to the query results. If you want a field that says ALL Schools,
create a field like this:

School: "ALL Schools"

If you want the school to be part of the aggregate result, you'll need to
create two queries: one for a specific school and one for all schools.
 

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