Hide duplicates in a query ...

  • Thread starter Thread starter Mikey C
  • Start date Start date
M

Mikey C

Hi folks

I would like to hide any duplicate records in a query. I have already
used the "Unique Values"parameter, but I would like to hide any
records where the first field is duplicated.

Did that make any sense?? ...

eg.

Field 1 Field 2
1 a
1 a
2 b
2 c

I would only like to show one record for "1" & one for "2" etc .....

Can anyone help?

Thanks
 
If it makes no difference which record of the group you want to see, you
could use an aggregate query where you group by field 1 and specify first
for every other field.

SELECT Field1, First(Field2) as F2, First(Field3) as F3
FROM YourTable
GROUP BY Field1

In the Query grid
-- Add all the fields you want to see
--Select View: Total from the menu
--Change Group By to First under all the fields except the first field.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top