Hide duplicate records

G

Guest

Is there a way to hide duplicate records in a query, I tried to do it in a
report and it still shows the duplicate records.
 
G

Guest

Change the record source of the report to a group by query, or add the word
distinct to the select Sql of the record source.

Select distinct Field1, Field2 From
 
G

Guest

How do I change the source of the report or where do I add the word
"distinict"? Thanks for your help.
 
G

Guest

Open the report in design view, open the properties of the report
Press (Alt+Enter) to open the properties box, then press on the left top
corner of the report, now the box will display the properties of the report.
One of the properties is "RecordSource Property", press on the button with
the three dots on the right.
You are now looking at the sql of the report, on the menu bar select view>Sql
And add the distinct just after the select.
 
G

Guest

This didn't work for me, how do I "change the record source of the report to
a group by query"?
Thanks
 
G

Guest

Check the field that are returned from the sql, one of the field doesnt have
a duplicate value, and this is why it doesn't remove duplicates, because
there are none.
The group by wont help you until youll find which field doesnt repeat it
self, it usually a date field, or amount field
 
G

Guest

Earlier you said to add the the distinct just after the select, what exactly
do I type after SELECT? Sorry, but I am new at this.
Thanks
 
G

Guest

No conection to your report

Open a new query, design view.
Add the table to the query, and list all the fields that you want to display
in the report.
Run the query, check how many records you have.
Now, In the menu bar select view > SQL.
You see
Select Field1,Field2,Field3 from TableName
Now add to the SQL
Select distinct Field1,Field2,Field3 from TableName
Run the query, check how many records returned.
If you have the same amount of records, it's mean that there are no
duplicates, if you have less records it mean that you eliminated the
duplicates.

Try it
 

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