Duplicates Records

  • Thread starter Thread starter Aurora
  • Start date Start date
A

Aurora

I am using Access 2000.
I have a query to pull the names and address of companies
we have sent literature to. We now want to follow up with
these sames companies with additional information. But
sometimes the customer is listed more than once because
maybe more than one sales person talked to the customer.

How do I get the query to only pull one copy of the record
if it is the same in two fields (Co Name and Contact
person). I am thinking I could have Company A with a
contact person of Mr. XYZ and Company A with a contact of
Ms. STV. I would want both of these listed but if I had
Company A with contact of Mr. XYZ listed more than once, I
only want one listing.

Is this possible? If so how do I do this?

Aurora
 
In the query design grid, right click the background where the tables go.
Choose Properties. The two properties you are interested in are Unique
Values and Unique Records.

From the Help file.
"You can use the UniqueValues property when you want to omit records that
contain duplicate data in the fields displayed in Datasheet view."

"You can use the UniqueRecords property to specify whether to return only
unique records based on all fields in the underlying data source, not just
those fields present in the query itself."

It sounds as if Unique Values is the one you want to set to Yes.
 
Hi,


SELECT DISTINCT f1, f2 FROM tableName


or


SELECT f1, f2 FROM tableName GROUP BY f1, f2




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top