How can I keep the AutoNumber from skipping numbers?

K

Kevin

Ok, I'll have one column on AutoNumber, and so it goes 1, 2, 3, etc..

But when I delete a row, it is as if that AutoNumber is gone for good.

Like if I have auto numbers from rows 1-125, if I delete row 125, then 125
seems to be gone, and so I have 123, 124, 126, 127,..

So how can I get that number back so numbers aren't skipped?
 
A

aaron.reese

Yes, it will, that is the whole point of autonumbers. NEVER use the
autonumber as a key on another table because if you have to rebuild the
table you will be well and truly stuffed.

Build a table for counters and write a function that returns the next
number from the counter and a procedure to update the counter.

Obiron
 
R

Roger Carlson

R

Rick Brandt

Yes, it will, that is the whole point of autonumbers. NEVER use the
autonumber as a key on another table because if you have to rebuild
the table you will be well and truly stuffed.

I don't understand this comment. People use AutoNumbers to relate tables
all the time. That is what they are best at. What they are not good at is
producing unbroken seqences, but that is not an issue when relating tables
to each other.

What do you mean by "rebuilding a table" that would cause a problem with
AutoNumbers used to relate tables?
 

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