Access Seed Problem

bokarinho

Registered User.
Local time
Today, 02:10
Joined
Mar 31, 2010
Messages
38
Hello,

I have an Access DB in which there is a table with an autonumber field in it. For some unexpected reason the seed does not work as expected and i am obliged to use a fix i found from Allen Bourne site, there is a function that resets the feed to the last correctly used value. The function is called AutoNumFix(). But i dont want to do it every day, i want to solve the mystery. Can you tell me what to do to fix this issue? Is the database corrupted? (Compact and Repair does not fix DB, table seed. )
 
what's not working ? is it go crazy or what ?
is the autonumber set to be Increment and not random ?
make sure that no part of your code enforce value for the auto number, by Append query. read more here - http://support.microsoft.com/?id=884185
 
There is no append query, just in a code on the click event of a button,
a docmd.goto new record.
Well i dont know what it is but the seed stops at a value and another value bigger than the seed exists in the database so it throws the message about duplicate key.
 
an autonumber should start from the next highest number in the table. Occasionally there is a corruption that results in the autonumber seed failing, (this is a know problem reported on MS Knowledge base) and the acknowledged solution is to write an append query to FORCE in the autonmuber you want, whereupon the autonumber should then reseed itself correctly.
 
an autonumber should start from the next highest number in the table. Occasionally there is a corruption that results in the autonumber seed failing, (this is a know problem reported on MS Knowledge base) and the acknowledged solution is to write an append query to FORCE in the autonmuber you want, whereupon the autonumber should then reseed itself correctly.

Well thanks a lot, i manually edited Allen code and insert a function before the event that creates a new record for the table. Function resets the autonumber to the highest value, and later a new record is created safely with the highest + 1 autonum.

Job Done, thank you all.
 
you can use DMax() + 1, instead of using AutoNumber
 

Users who are viewing this thread

Back
Top Bottom