Help! Autonumber messed up

Mackbear

Registered User.
Local time
Today, 01:31
Joined
Apr 2, 2019
Messages
168
Hi good day! I have several questions for the past few days and I may not have responded to it yet and now came across another problem. I have a table with several tables related to it through the autonumber field. Now this autonumber messed up. I was not able to add new record saying that the primary key may cause duplicate. It seems to increment a number that it says already existing. How do I reset this autonumber and the changes would also apply to the related tables? I hope there is a solution... :banghead::banghead::banghead:
 
Hi. I hope you have a backup. Take a look at Allen Browne's website for some suggestions on how to fix this. Here's the link. Good luck!
 
Hi. I hope you have a backup. Take a look at Allen Browne's website for some suggestions on how to fix this. Here's the link. Good luck!

I am looking at it right now, I am not sure, would you know if this would change the numbers as well on my related tables respectively like would it change the related table's autonumbers that corresponds to their number on the main table?
 
I am looking at it right now, I am not sure, would you know if this would change the numbers as well on my related tables respectively like would it change the related table's autonumbers that corresponds to their number on the main table?
It might if you had Cascade Update enabled.
 
saying that the primary key may cause duplicate. It seems to increment a number that it says already existing.

Does your criteria for your autonumber look like this?

attachment.php
 

Attachments

  • Capture1.PNG
    Capture1.PNG
    7.9 KB · Views: 543
It I didn't have time since I was in a rush to add data into it as some people needs to start working on those data, what I did so I can be able to add data was to switch it to Random and it's all messed up...='c

I am trying to fix it now, I am wondering why when I autonumber it does not start with 1, it started at 2 and I see the number 1 in the somewhere middle of the list, then number 4 at the last... why is it this way?
 

Attachments

  • help.JPG
    help.JPG
    16.1 KB · Views: 203
Your image doesn't show an unusual set of autonumbers and they are in proper order. Were you expecting them to also be contiguous? Because they won't be. "Contiguous" ISN'T a property of autonumbers.
 
Hi it'e been a while I apologize as I have been busy sorting out stuff... so the autonumber got messed up and I have child tables related, what I just did was to create another autonumber field, then i switched my pk field to number again, then copied the new autonumber field values and pasted them to the pk field that is now a number so now it cascade update every child tables. Then i removed the relationships, deleted the original pk field as i cannot switch it back to autonumber, then made the new autonumber field I created as the pk... and returned the relationsips. solved the problem! Thank you for the help everyone!
 
Hi it'e been a while I apologize as I have been busy sorting out stuff... so the autonumber got messed up and I have child tables related, what I just did was to create another autonumber field, then i switched my pk field to number again, then copied the new autonumber field values and pasted them to the pk field that is now a number so now it cascade update every child tables. Then i removed the relationships, deleted the original pk field as i cannot switch it back to autonumber, then made the new autonumber field I created as the pk... and returned the relationsips. solved the problem! Thank you for the help everyone!

Hi. Thanks for the update. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom