Results 1 to 3 of 3
  1. #1
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,730

    Acc2010 - unique index violation - no error??

    I just helping someone with an acc2010 database. Created 2 tables, Investor, Investment and a junction table InvestorhasInvestments.



    I entered data by means of a Form, and purposely tried to get the duplicate record error (3022) by attempting to insert multiple Investor - Investment records (1,3). The records did not get entered. However, the autonumber was incremented for every attempt (see the table below IDs 4-21).

    Access did not give an error, nor any warning that I was trying to add a duplicate record.

    I did modify code to do a DCOUNT > 0 and it would display my message box. I then commented it out, and commented out my attempt to trap the 3022, but NO error message/warning/nothing was received.

    Do you have to turn Errors ON with acc2010. This is my first form/report with Acc2010?

    ID Investor Investment
    1 1 1
    2 1 2
    3 1 3
    22 2 2
    23 2 4
    24 2 5
    25 2 6
    26 3 1
    27 3 4
    28 3 5
    29 3 7
    30 4 9


    The database and related info can be found at post#12
    https://www.accessforums.net/access/...ord-30358.html


    AH Ha Moment: Just realized I did not have dbFailOnError on the execute!!!!
    Attached Thumbnails Attached Thumbnails InvestorRelationships.jpg   InvestorUniqueIndex.jpg  

  2. #2
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Your profile says v2003, have you upgraded? Also may I call on you when I need a link to a tutorial or such like; you seem to be the forum's librarian of useful links.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,730
    Hi Rod,

    I have just installed 2010 on one machine. I am most familiar with 2003 and that interface. Having some issue with the new interface -- just finding things.
    Certainly post or PM whenever.

    orange

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

Similar Threads

  1. Replies: 4
    Last Post: 01-14-2016, 02:18 PM
  2. Replies: 1
    Last Post: 08-19-2012, 09:55 PM
  3. Creating a unique index on two fields
    By Paul H in forum Database Design
    Replies: 3
    Last Post: 11-03-2011, 10:15 AM
  4. Eerror No unique index found
    By newtoAccess in forum Database Design
    Replies: 4
    Last Post: 12-10-2010, 08:30 AM
  5. Replies: 4
    Last Post: 06-10-2010, 07:51 AM

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