how to use DISTINCT in query to not get duplicates

G

Guest

My query is pulling records from a master table of my companies clients
(other companies).

But there can be many records for 1 client( a company) based on their
location. what approach could I use to only get 1 record for the comany. here
is a sample of what the query pulls now.

GroupNumber Group Name_and_location TerminationDate

01674 HINF Inc 20080202
01674 HINF Inc/Houston 20080202
01674 HINF Inc/LittleRock 20080202

Is there a way using DISTINCT or another approach to just get the first
record based on the GroupNumber Field. Basically a statement like this "pull
all records from the mastertable, but only the first record for when the
number field repeats"
 
E

Ed Robichaud

You could use a "totals" query to return the first/min record; see Access
Help for details. You could also use a report with a group header of
[GroupNumber], then either show or hide all their related details.
-Ed
 

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