Results 1 to 11 of 11
  1. #1
    andrew.ang8843 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Posts
    4

    Access Query showing duplicate records


    Hi Experts,

    I have an issue in my query whereby it's giving me duplicate records.
    I'm currently using Access 2016 and I have attached screenshots of my output and design view layout.
    I have also checked the 3 tables but did not find any duplicate entries.
    Please help to advise me.
    Attached Thumbnails Attached Thumbnails Duplicate records.png   Design View.JPG  

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Almost certainly one of the fields being joined on has more than one record in a table. Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    andrew.ang8843 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Posts
    4
    Do you mean that to attach the whole DB file?

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    That, or a sample with those 3 tables and the query. Something that would let us recreate/debug the problem. I do suspect there are duplicate records.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    thewatcher101 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Location
    Los Angeles
    Posts
    5
    That is almost always the case, if you have excel you can always copy and paste the value you are joining, and have excel test if there are duplicates.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Serial Number is synonymous with Canister Number? Why are Material and Batch in all 3 tables? I agree, provide database so we can work with the data. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    andrew.ang8843 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Posts
    4
    Hi Experts,

    I have attached the 3 files.
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Didn't make it easy for us to help you. Why didn't you import into Access db instead of requiring us to? Those text files had to be edited before could link. Oh well, I had time to kill.

    I built query per your image and I don't see the duplicates. Closest I get is:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	15 
Size:	7.9 KB 
ID:	31376
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    andrew.ang8843 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Posts
    4
    Hi Expert,

    Can you show me how you built your query?

  10. #10
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Ref number and changed on fields are not shown in either example pic. Values in one or both of those fields may be unique over the records.
    Maybe outer joins contribute to this result (confess I elected not to build a db with the supplied data)? Or is it a simple matter of not having set the unique values or unique records property?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I built it per your image. I used the query designer and made it look like your image.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Crosstab query showing duplicate rows
    By Aliasjeffturner in forum Queries
    Replies: 3
    Last Post: 04-18-2017, 07:10 AM
  2. Replies: 2
    Last Post: 05-26-2016, 11:20 AM
  3. Replies: 2
    Last Post: 12-22-2014, 11:28 AM
  4. Replies: 2
    Last Post: 05-02-2012, 09:16 PM
  5. query showing duplicate data
    By dan-gauci in forum Queries
    Replies: 2
    Last Post: 10-20-2011, 02:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums