Undo still Increases record ID

GregSmith

Registered User.
Local time
Today, 16:56
Joined
Feb 22, 2002
Messages
126
I have a UNDO command button that when pressed undo's any change made to the form. The only thing is that the record ID keeps increasing. How can I requery the database to reset the ID??

I am using me.requery now and it's not working...
 
You'll either have to use a custom number routine or compact the database to reset the autonumber
 
My Table is called Objects and my form is called New User Form
The field I need to reset is ID

Can I do something like ID=ID-1?
 
Autonumbers are NOT intended for anything but automatically provide an unique identifier. The behaviour you noticed is precisely intended to ensure this purpose.

Any attempt to rely on an autonumber for other objectives (like expecting them to be sequencial) is trying to give them a meaning they do not and cannot have and will only lead into difficulties.

If you want a sequential number, you should go for another dedicated field and custom function as per Rich's second suggestion.
 

Users who are viewing this thread

Back
Top Bottom