Resetting Autonumber

M

Michael

Hi All
I have copied a database to another folder so that I can reuse it next
financial year.
I have deleted all of the records and am now trying to reset the Autonumber.
While the database is completely blank, every time I input the first record
the Auto number picks up where it left off last year.
Can someone please advise how I can reset the damn thing.
Thanks for any help or suggestions.
Regards
Michael
 
T

Tom Wickerath

Hi Michael,

You need to use Tools > Database Utilities > Compact and Repair Database...

in order to reset the Autonumber field. This will only work in a table if
you have deleted *all* records.

I'm curious why you would want to start over with a new database for a new
fiscal year. Seems to me like this would make comparing data between various
fiscal years very difficult.

Tom
___________________________________

:

Hi All
I have copied a database to another folder so that I can reuse it next
financial year.
I have deleted all of the records and am now trying to reset the Autonumber.
While the database is completely blank, every time I input the first record
the Auto number picks up where it left off last year.
Can someone please advise how I can reset the damn thing.
Thanks for any help or suggestions.
Regards
Michael
 
M

Michael

Thanks Tom
The data is year specific and not fiscal.
Each year has different requirements as per our contract.
It's for the government, so you can imagine what hoops we have to jump
through, for not particular reason.
Regards
Michael
 
N

Nikos Yannacopoulos

Michael,

If you have no records in the table, do a Compact and Repair and it will
reset the autonumber.
That said, you should do that regardless of the autonumber, in order to
claim back unused space, which Access does not relinquish automatically
when you delete data! Actually, you should do it regularly in the
interest of adta integrity and database longevity.

HTH,
Nikos
 
T

Tom Wickerath

Hi Michael,

I forgot to mention that the Autonumber datatype should be thought of as a
meaningless number. It should not be displayed on any forms or reports. You
can still include a textbox for an autonumber primary key on a form, but my
advice is to set the visible property for the textbox to no. Having the
textbox on the form provides a way of referencing the primary key in VBA
code, should you have the need to do so.

An autonumber value that is displayed to a user is just likely to confuse
the user. Most users will think of the autonumber as a count of records. It
does not serve this purpose.

Tom
___________________________________

:

Thanks Tom
The data is year specific and not fiscal.
Each year has different requirements as per our contract.
It's for the government, so you can imagine what hoops we have to jump
through, for not particular reason.
Regards
Michael
--
Michael Mitchelson
___________________________________

:

Hi Michael,

You need to use Tools > Database Utilities > Compact and Repair Database...

in order to reset the Autonumber field. This will only work in a table if
you have deleted *all* records.

I'm curious why you would want to start over with a new database for a new
fiscal year. Seems to me like this would make comparing data between various
fiscal years very difficult.

Tom
___________________________________

:

Hi All
I have copied a database to another folder so that I can reuse it next
financial year.
I have deleted all of the records and am now trying to reset the Autonumber.
While the database is completely blank, every time I input the first record
the Auto number picks up where it left off last year.
Can someone please advise how I can reset the damn thing.
Thanks for any help or suggestions.
Regards
Michael
 
Top