Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding New Records Dup Primary ID (2000)

    Hi,
    I have a table created. Nothing special, just a plain table. I have an ID field set as Autonumber. I have a form based on the table. When I click in the add new record button and try and add a record it gives me the "this will create dup id number", so when I go into the table the autonumber is trying to add a number that was added before. Why would this be happening? I have it set as the primary key, it says no duplicates, why doesn't it keep count as to what numbers it has already added?
    Thanks,
    Deb Buck

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Adding New Records Dup Primary ID (2000)

    Do you have any of the service releases installed? There was a problem with the original release of Access 2000, which was cured in SR-1a , that did not reset the autonumber seed when records were appended to the table including autonumber values. If that isn't the problem in your case, then you'll have to tell us what is going on in the form that might be causing the problem.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding New Records Dup Primary ID (2000)

    I have SR-1 installed. I'll ask if I can get a. I have about 5 other tables that all use the Autonumber and I'm only having trouble with one table. Does that make a difference. Thanks,
    Deb

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Adding New Records Dup Primary ID (2000)

    Check the secondary indexes on the table and see if you have any fields that don't allow duplicates but should by their very nature.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Adding New Records Dup Primary ID (2000)

    If your installation says SR-1, you probably already have SR-1a, so that should be OK. As Pat says, something else is causing the problem if it's only on one table, so you'll have to do some detective work to track it down.
    Charlotte

  6. #6
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding New Records Dup Primary ID (2000)

    Shot in the dark here.
    Do you have the autonumber field as part of the recordsource of the form?
    <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  7. #7
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding New Records Dup Primary ID (2000)

    Hi Deb

    I had the same problem using a2k (9.0.3821) SR-1 Jet 4.0

    I chalked it up to a corrupted table

    To solve the problem I had to:

    1. Import the table in question into a new db
    2. Delete the original table in production db
    3. Compact & Repair
    4. Import the new db table back into the production db

    HTH

    Would be interested on how you solved your problem

    John

Posting Permissions

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