Results 1 to 2 of 2
  1. #1
    jc1234 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    25

    A query to delete records that have a combination of only two duplicate fields?

    each record I have has 18 fields, and all but 2 of them can be duplicated many times. I would like to create a query that deletes any records that have both of these fields with the same combination of values.



    field one has 254 possible values and field two has 8 possible values. If two or more records were to be a match of field one and field two, I would like it deleted.

    How would I go about doing this? Once this query is run, Im planning to make a multifield primary key that will prevent me from entering a sequence of duplicates. It wont let me create the key now, as I must have duplicates.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    have you tried to "GROUP BY" in a query?

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

Similar Threads

  1. Duplicate Records
    By softspoken in forum Queries
    Replies: 3
    Last Post: 06-21-2010, 03:33 PM
  2. Delete record if duplicate
    By rubintheyid in forum Access
    Replies: 8
    Last Post: 03-30-2010, 11:33 AM
  3. Delete duplicate records
    By Zukster in forum Queries
    Replies: 1
    Last Post: 08-26-2009, 03:14 AM
  4. Running a Delete (Records) Query on Close
    By NoiCe in forum Queries
    Replies: 1
    Last Post: 07-12-2009, 06:17 PM
  5. Prevent Duplicate Values on Combination of Two Fields
    By LornaM in forum Database Design
    Replies: 8
    Last Post: 05-05-2009, 11:16 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