Resetting Autonumbers and creating new rows

G

Guest

Hi, I have a table which starts with an autonumber as the primary key.

Two things I am having difficulty with. I've noticed if I were to create
seven items on the row, the autonumber would go up to seven, delete the last
three, the next number would be eight. Is there anyway to make it so it
reuses numbers once they are no longer represented on the table rather then
continously counting up?

Second, I want to add rows to a table (the same one actually) where all the
fields are blank, instead of changing the rows, I want to do this with a
query, I assume I need to do it using an append query, but I do not know how.
The rows would ideally be blank, but I could start with just one field,
aside from the autonumber field. Thanks.
 
J

Joseph Meehan

UnderSeven said:
Hi, I have a table which starts with an autonumber as the primary key.

Two things I am having difficulty with. I've noticed if I were to
create seven items on the row, the autonumber would go up to seven,
delete the last three, the next number would be eight. Is there
anyway to make it so it reuses numbers once they are no longer
represented on the table rather then continously counting up?

Second, I want to add rows to a table (the same one actually) where
all the fields are blank, instead of changing the rows, I want to do
this with a query, I assume I need to do it using an append query,
but I do not know how. The rows would ideally be blank, but I could
start with just one field, aside from the autonumber field. Thanks.

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.

See:
http://www.lebans.com/rownumber.htm
 

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

Top