Eliminating Duplicate on a Query (1 Viewer)

latino

Registered User.
Local time
Today, 20:18
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
 

lamha

Registered User.
Local time
Today, 20:18
Joined
Jun 21, 2000
Messages
76
No criteria is needed. You need a group by clause like this

SELECT ClientID, Max(DateVisit) AS VisitDate
FROM Clients
GROUP BY ClientID;
 

pablofonto

Registered User.
Local time
Today, 12:18
Joined
Sep 8, 2005
Messages
79
you can avoid duplicates in your query by going into your query properties and change the "unique values" field to YES.
 

latino

Registered User.
Local time
Today, 20:18
Joined
Aug 22, 2000
Messages
11
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
 
D

dccampbell

Guest
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
 

edtab

Registered User.
Local time
Today, 20:18
Joined
Mar 30, 2002
Messages
257
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

Top Bottom