By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,947 Members | 1,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,947 IT Pros & Developers. It's quick & easy.

AutoNumber

P: n/a
I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.

Thanks in advance
Sep 29 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Fri, 29 Sep 2006 19:16:42 -0400, Dr. Edmund M. Hayes wrote:
I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.

Thanks in advance
After you delete the data in the table(s) (not the tables themselves),
compact the database.
Tools + Database Utilities + Compact and Repair

Note. While this will re-set the autonumber to 0, it really shouldn't
matter what value the number is, as long as it is unique.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Sep 29 '06 #2

P: n/a
On Fri, 29 Sep 2006 19:16:42 -0400, Dr. Edmund M. Hayes <ed@edhayes.comwrote:
>I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.

Thanks in advance
Once you have deleted all data from the table, compact the datafile. The
Autonumber will be reset and start at 1.

However, if the number generated by the Autonumber is important and needs to be
sequential, then you should not be using an autonumber. The A/N sequence will
get gaps overtime.
Wayne Gillespie
Gosford NSW Australia
Sep 29 '06 #3

P: n/a

Dr. Edmund M. Hayes wrote:
I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.

Thanks in advance
This may help. If you deleted the test data. Open the table in design
mode. copy the field name for Autonumber. deleted save the table.
create the same autonumber field with the name and properties. It
should begin again at "1".

Hope this helps, its simple.

loringdo

Sep 30 '06 #4

P: n/a
loringdo wrote:
Dr. Edmund M. Hayes wrote:
I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.
If you need anything more robust than what can be accomplished by
compacting, check the Access Security FAQ, section 3.11. It discusses
the Modify Autonumber permission that can be set via DAO. I've never
used this, but it can be done.

Sep 30 '06 #5

P: n/a
Thanks again for the help.............

Ed

On Fri, 29 Sep 2006 19:16:42 -0400, Dr. Edmund M. Hayes
<ed@edhayes.comwrote:
>I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.

Thanks in advance
Sep 30 '06 #6

P: n/a

"Dr. Edmund M. Hayes" <ed@edhayes.comwrote in message
news:s5********************************@4ax.com...
>I made a database and tested it a few times.
I now wnat to use it in production.
I deleted all the test data.
Is there a way to tell it to start autonumbering from 1 or am I stuck
with like 29 that was from testing the database 28 times.
Autonumbers are only guaranteed to be "unique," not to be any particular
number, and are intended to be used only internally for identification/keys,
foreign keys, and joins, so you should not have any need to reset them
(though others have told you how). They are NOT intended for presentation /
showing to users. If you have need of a sequential,
monotonically-increasing number to present to users, you can create it one
of several ways, the DMAX domain aggregate function being a common one.

Larry Linson
Microsoft Access MVP
Sep 30 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.