Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Help Urgently needed

Status
Not open for further replies.

rexie

IS-IT--Management
Jan 31, 2002
32
US
Hi all,
I am needing some urgent help in MS access. I have a query with three fields and what I need to find is to give me all the records with duplicate values, (FieldA + FieldB + FieldC)is kinda key. I have tried using duplicate query but no luck,

Please help!!!

 
Open a query in design mode and switch to SQL view. Paste the following in:

SELECT Field1, Field2, Field3, Count(Field1) AS CountOfDuplicates
FROM tblTableName
GROUP BY Field1, Field2, Field3
HAVING (((Count(Field1))>1));

Change the field names as appropriate and change tblTableName to the name of the table from which the fields come.

This should give you a list of records that have duplicates and tell you how many duplicates there are.
"The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
hi,

Thanks for the reply, but the query seems to be choking, its not working.

I have 3 fields Customer_id, Invoice_ID, Apply_ID, I want to pick the Same Customer_id, same Invoice_ID, same Apply_ID, meaning to say, the combination of the fields should be a key and find those duplicates. Please help
 
In the SQL statement did you replace EVERY occurence of Field1 with Customer_ID etc. and enter the correct table name?

What message do you get when it chokes? "The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
Hi,

I greatyl appreciate your time and effort, my whole project was wrong and that is why your duplicate query wasnot working, I once agin thank you a lot for your help. I am facing yet another problem with the same project. I would like to use a "Select Case " Statement in my build. What I wanna do is to have multiple IF statements. Can your suggest something.

thanks once agian
 
rexie,

Please repost your question in a new thread so that people interested in this new subject will see it.
"The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top