Eliminating Duplicate on a Query

latino

Registered User.
Local time
Today, 21:36
Joined
Aug 22, 2000
Messages
11
I have a query for clients who come to our office looking for services.
I only need to report 1 visit per client during the month, in other words if the client comes several times during the month, we only count 1.

When I run the query, it gives all the times the client came to the office, but I only need to show once.

Clients are being sorted by ClientID. What do I need to write in the Criteria field to filter clients from showing again ?

Thanks
 
No criteria is needed. You need a group by clause like this

SELECT ClientID, Max(DateVisit) AS VisitDate
FROM Clients
GROUP BY ClientID;
 
you can avoid duplicates in your query by going into your query properties and change the "unique values" field to YES.
 
I couldn't find the property that allowsme to change the unique value field to yes. Where do you find it? Is it on the design view of the query? Please help.
Thanks
 
ditto

I am looking for the same thing.. In Reports, there is the ability to turn off Duplicate entries... but this isn't really what you are looking for.

I am not seeing the "unique values" field in the Design View either
 
In the top part of the query design where the tables are, right click on the blank space and you will see the "unique" property setting.
 

Users who are viewing this thread

Back
Top Bottom