Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Duplicate Records in Query (Access 2002, XP Home)

    When I create a select query using two tables with a relationship between each table's IDs, the query always results in each record being selected twice. This only occurs when I add the second table and its relationshp to the query.

    One table has an auto-numbered ID field (no duplicates), the other has an ID field (duplicates OK) that links to the first table's ID.

    I can't figure out why the query displays each record twice.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Duplicate Records in Query (Access 2002, XP Home)

    The usual reason is because you have more than one record for each ID in the second table. You'll see the parent record repeated for each match in the child table.
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Duplicate Records in Query (Access 2002, XP Home)

    If you joined the tables correctly, the query should return one record for each record in the second table; since multiple records in the second table can correspond to the same record in the first one, fields from the first table may be repeated.

    Without further information it is hard to give specific advice; if you would like more help, you could post the SQL of the query (you can switch from design view to SQL view using the View menu or View dropdown list in the Query Design toolbar, then copy the text to the clipboard).

  4. #4
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Duplicate Records in Query (Access 2002, XP Home)

    Thanks, I got that one fixed. But see a new post for a new problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •