How do I fix a messed up auto number?

odin1701

Registered User.
Local time
Yesterday, 17:37
Joined
Dec 6, 2006
Messages
526
I have an ID field set as auto number, just because I need something for a key and all other data is not unique.

The problem is that it is not incrementing properly. I have 121621 in the autonumber field in the last record.

When making a new record, it is using 105347, which obviously already exists, and is causing problems.

I have already done a compact and repair which is supposed to fix this, but it has not. Is there anything else that I can do?
 
ok, finally found a KB article which helped, got it working again with some VB code.
 
...and which is this code...? I have exactly the same problem and didnt manage to find anything on internet.
 
...and which is this code...? I have exactly the same problem and didnt manage to find anything on internet.

Well this takes me back! It's been a long time since I've fixed this, but I think I used this here:

http://allenbrowne.com/ser-40.html

That's a good resource for other things as well. I don't have quick access to my code as I'm not with that company anymore, but try the above and see if that works for you.
 
Well this takes me back! It's been a long time since I've fixed this, but I think I used this here:

http://allenbrowne.com/ser-40.html

That's a good resource for other things as well. I don't have quick access to my code as I'm not with that company anymore, but try the above and see if that works for you.

Thank you very very much! Very kind of you. :)
 

Users who are viewing this thread

Back
Top Bottom