Sorting out single occurences in a query

supportt

Registered User.
Local time
Today, 14:15
Joined
Nov 21, 2001
Messages
70
I have a simple query, that I am using to select records based on a start date & end date. There is only 4 fields being returned:

First Name
Last Name
Ticket Number
Date

All the data is coming back fine, but I would like to sort out records where the First Name & Last Name occur more than once. Another words, I only want to see records if John Doe has more than one record. I have tried using the criteria for First Name & Last Name >"1" but that did not seem to do anything. Anyone have any simple suggestions?????? It would be very much appreciated.

Thanks
 
Last edited:
If you have records with duplicate data and it is intentional then you need to redo you database struture as you are going against database normalization. If you want to get rid of duplicate data then you can use the Find Duplicates Query Wizard to do this for you.

hth,
Jack
 
Query

Jack, it is not duplicate data, what we are trying to do is, see how many times a customer calls in a given date range. Each record is a separate tickets. So each First Name/Last Name could have many records, but they are treated as individual tickets.

Hope thats helps

Thanks
 
Last edited:
Gotcha! Use a Totals query and use the Count in the Total: line of the QBE grid....

hth,
Jack
 
Query

Jack, bare with me here, I am new to Access......I am not sure I understand the totals query, can you expand a little on that process?

Thanks
 
If you open a new query and add the table in question you can drag the name to the QBE grid twice. Then click on the Sigma icon (funny looking E) to make the query a Totals query. You will see Group By under the two fields. Change the last one to read Count. Now if you open the query you will see the names and to the right the number of records for each. You will need to add the date field, of course, to filter the data so set its Total line to Where and you should be good to go...

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom