AutoNumber field

  • Thread starter Thread starter Roger Bell
  • Start date Start date
R

Roger Bell

I have created an AutoNumber Field in a data base and
added several hundred records.
I want to use the same design for a seperate data base
and have made a copy of the original data base and
deleted all the records. My problem is that when I start
adding records to the new data base, it automatically
generates a new number eg: 306, and does not start with
1, which is what i want.

Any help would be appreciated
 
Hi roger,

If you even care what an autonumber value is then you are miss-using it. It
should never be visible to your users and you shouldn't care what its value
might be. The autonumber datatype exists strictly to generate uniqueness
for use as a surrogate key.

All that being said, when you start with your new empty structure, compact
before you add any records.

HTH
 
Roger said:
I have created an AutoNumber Field in a data base and
added several hundred records.
I want to use the same design for a seperate data base
and have made a copy of the original data base and
deleted all the records. My problem is that when I start
adding records to the new data base, it automatically
generates a new number eg: 306, and does not start with
1, which is what i want.

Any help would be appreciated

I suggest you may not want to use Autonumber for that use. Autonumbers are
designed to provide unique numbers. It in not designed to provide numbers
in order and for a number of reasons may not do so. As a result using them
in any application where the user sees the numbers is likely to end up with
confusion.

There are other ways of providing the numbers you want depending on the
particual application.

In any case you do want to compact the database as those "deleted"
records are not really deleted until you compact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top