Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2003
    Posts
    24

    Unanswered: Duplicate Query Records

    How can a Query exclude duplicate records, leaving the existing record in the query?

    Basically I don't want duplicate records showing up in a Report.

    Any help would be great.

  2. #2
    Join Date
    Jan 2003
    Location
    Dordrecht, The Netherlands
    Posts
    95

    Re: Duplicate Query Records

    Originally posted by lunch36
    How can a Query exclude duplicate records, leaving the existing record in the query?

    Basically I don't want duplicate records showing up in a Report.

    Any help would be great.
    Open the properties window of the query and set "Unique values" to "Yes". The query only shows one record for each record of which ALL fields have equal values.

    Ad Dieleman.

  3. #3
    Join Date
    Jan 2003
    Posts
    24
    What if we only need to check if one of the values are duplicated, i.e.

    NameID - Name - Tester
    001 - - - - Smith - - - Kansas
    001 - - - - Smith - - - Kansas
    002 - - - - Johnson - - - Washington
    002 - - - - Johnson - - - Washington
    005 - - - - Wilson - - - Washington


    The only info that I would need would be:

    001 ...
    002 ...
    005 ...

  4. #4
    Join Date
    Jan 2003
    Location
    Dordrecht, The Netherlands
    Posts
    95
    Originally posted by lunch36
    What if we only need to check if one of the values are duplicated, i.e.

    NameID - Name - Tester
    001 - - - - Smith - - - Kansas
    001 - - - - Smith - - - Kansas
    002 - - - - Johnson - - - Washington
    002 - - - - Johnson - - - Washington
    005 - - - - Wilson - - - Washington


    The only info that I would need would be:

    001 ...
    002 ...
    005 ...
    You'd still need to set "Unique Values" to "Yes", but be sure to include only the fields NameID, Name and Tester in your query definition.

    Ad Dieleman.

  5. #5
    Join Date
    Jan 2003
    Posts
    24
    I am not seeing where you can set the "Unique Values" to "Yes". I don't seem to be seeing this option...please advise. Thanks.

  6. #6
    Join Date
    Jan 2003
    Location
    Pittsburgh, PA
    Posts
    86
    Originally posted by lunch36
    I am not seeing where you can set the "Unique Values" to "Yes". I don't seem to be seeing this option...please advise. Thanks.
    There are three ways of doing this same thing in Access:

    Open the design view of your query. On the menu, choose View/Properties. "Unique Values" will be about the fifth thing down on the list.

    Or you could take the short cut by right clicking in the gray Design View area (area where your tables are demonstrated).

    Or, you could go to the SQL View of your design, and change the SELECT to SELECT DISTINCT.

    Hope this helps.

  7. #7
    Join Date
    Jan 2003
    Location
    Dordrecht, The Netherlands
    Posts
    95
    Originally posted by lunch36
    I am not seeing where you can set the "Unique Values" to "Yes". I don't seem to be seeing this option...please advise. Thanks.
    Right-click in the grey area of the upper-half of the query design window (where the tables are shown). Then select Properties from the menu.
    BTW, I'm not completely sure about "Unique values", it's the translation from my menu-option in Dutch.

    Ad Dieleman.

Posting Permissions

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