Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2011
    Location
    Chicago
    Posts
    37

    Question Unanswered: Error message when adding a form entry

    When attempting to add a contact name to my Access DB, I've been getting a prompt the last week stating:

    "The changes you requested to the table were not 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."

    When checking the contacts table, there is no duplicate entry for the name I'm attempting to enter.

    I'm not sure what's causing this, and need some help in trying to troubleshoot this issue. Any help will be much appreciated. Thanks.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    If Access says so, believe me: there would be duplicate values somewhere in your database. It's not necessary a duplicate row in one table, though.

    How do you try to add the offending data? Through a form, directly in a table open in Access interface, using a query or VBA code? What are the indexes for the concerned table?
    Have a nice day!

  3. #3
    Join Date
    Jul 2011
    Location
    Chicago
    Posts
    37
    I'm adding the info through the form. Theres a button set up to add a new contact which makes another form pop up to add the info.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Can you send the code behind the button and the code running in the pop-up form (if any)?
    Have a nice day!

  5. #5
    Join Date
    Jul 2011
    Location
    Chicago
    Posts
    37
    The code is Macros for the button, and its 'Open Form' with the Form name in the 'Arguments' field.

    As for the "Add & Close" button on the Add Contact form, it is also Macros, 'Close' and ', , Prompt' in the Arguments field.

Posting Permissions

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