hide duplicates in a query

G

Guest

I am creating a query for a report that will provide the number of students
who attended a class at a specific institution.

Example or what I have now
Joe Smith, from University A, attended 2 different classes
Class 1
Class 2
Jane Doe, from University A, attended 3 different classes
Class 1
Class 3
Class 4

When I generate my report it adds up to be 5 course attendees from
University A.

What I need is it to report just 2 attendees from University A. Which means
I need it to disregard the other entries in the class schedule so that the
name is counted only once. I tried hiding duplicates (under properties) but
it didnt work.

My current query only has two fields Name (student name) and Institution
(where they come from).

Sounds so easy but I am temporarily stumped.. Any help would be appreciated.

Jim
 
R

Randy Harris

Jim, you're going to need to use something called an aggregate query. If
you are using the Access query builder, you'll find a button on the toolbar
with the sigma symbol on it. Pressing that will change the query grid and
permit you to set the university and class to "Group By" and the student to
"Count". That will give you a count of students in each class at each
university.

Hope this helps.
 
G

Guest

In Access SQL Help, look up the SELECT statement, and the explanation of
DISTINCT under the "predeicates" section.
 

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