Results 1 to 7 of 7
  1. #1
    ckoop is offline Novice
    Windows XP Access 2007
    Join Date
    May 2014
    Location
    Minnesota
    Posts
    1

    Question How to eliminate duplicate mailing addresses in a query with 4000 names

    I have 4000 vol for an event listed in a query, most work more than one shift, some as much as 10 shifts. In preparing labels for a mailing of work schedule cards I want to eliminate the multiples going to the same address. HOW

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    You will need to run a delete query for table(s) and enter your criteria,such as shift(s) and email address.
    Hard to say without more details.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I would start by building small Totals queries that employ GROUP BY. The trick is to query your table by including the least amount of fields/columns. This is usually done by not including the primary Key. Then you can use your query in another query and join on a field such as Address. Here you will include a Foreign key that can be used as a JOIN for another query that will be the final main query.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    In the query propeties, set UNIQUE VALUES = YES.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by ranman256 View Post
    In the query propeties, set UNIQUE VALUES = YES.
    Why would you choose that over GROUP BY or maybe SELECT DISTINCT with an alias?

  6. #6
    bridgeo730 is offline Advanced Beginner
    Windows XP Access 2016
    Join Date
    Jan 2018
    Posts
    33

    How?

    Quote Originally Posted by ranman256 View Post
    In the query propeties, set UNIQUE VALUES = YES.
    How do you do this?

  7. #7
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    SELECT DISTINCT does exactly the same thing as setting Unique Values = Yes

    Method 1:
    Open query in design view, then set unique values = Yes in the query property sheet

    Method 2:
    Open query in SQL view.
    Replace SELECT with SELECT DISTINCT at the start of SQL statement
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Eliminate Duplicate (mirrored) Results
    By fauowls in forum Access
    Replies: 3
    Last Post: 03-21-2013, 03:39 PM
  2. Query Entity Names, and Column Names
    By Accidental DBA in forum Queries
    Replies: 1
    Last Post: 07-22-2011, 02:38 PM
  3. check for duplicate First and Last names?
    By newtoAccess in forum Access
    Replies: 3
    Last Post: 03-19-2011, 04:05 PM
  4. Mailing Query Question
    By bobbyfunk74 in forum Access
    Replies: 2
    Last Post: 03-01-2011, 12:15 PM
  5. Customer Entry/Find Duplicate/Similar names
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-27-2010, 09:20 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