Results 1 to 3 of 3
  1. #1
    klutz2009 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    2

    Updating data in table B based off table A - Duplicates

    Hello All,

    This is my first post, sorry if it's in the wrong thread.

    I need help understanding how to accomplish the following in Access 2007.

    I have two tables, Table Products & Table Sold and I'm trying to aggregate the products table to reduce the total number of products and I want this update to happen with all tables that share a 1 to many relationship with the product table. (table sold is one of those)
    So let's say I have products apple, pear, bananna. I am now aggregating them to all just be called fruit. Problem is when I make this change in the product table I get this error:



    "The changes you requested to the table were no successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

    So I'm not sure how to go about aggregating data in a table that has 1 to many relationships with many other tables. A
    I would appreciate any help at this point. Thank You!

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Can we see your tables and relationships.

    Dale

  3. #3
    klutz2009 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    2
    Click image for larger version. 

Name:	sample_db.jpg 
Views:	5 
Size:	75.6 KB 
ID:	12410

    rzw0wr, I've attached a picture of the tables with the data and the relationship between the two.

    Essentially what I'd like to do is change the Apple, Grape, & Pear all to "fruit" in the product table. My question is, once I change all of these products to "fruit", how can I make sure that the change translates to the Sold table. Since Product is the primary key in the product table, I'm unable to change all three (Apple, Grape, and Pear) to fruit because then I would have duplicates and Access won't allow that. That is where I get the above mentioned error.

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

Similar Threads

  1. Replies: 6
    Last Post: 05-10-2012, 08:20 PM
  2. Query isnt updating table based on criteria
    By shabbaranks in forum Queries
    Replies: 12
    Last Post: 01-10-2012, 11:51 AM
  3. Replies: 3
    Last Post: 08-08-2011, 11:02 AM
  4. Replies: 2
    Last Post: 07-07-2011, 08:25 AM
  5. Replies: 1
    Last Post: 05-25-2010, 02:58 PM

Tags for this Thread

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