Marlie said:
Hi Lynn,
I tried to compact the database and yes, it did go back to number one, but
when >I try to enter data again, it is doing the same thing, even if I
cancel what I've >entered, the numbering still continues. What I want is if
I cancel what I've >entered, I want that number for the next record. Please
can someone help. >Thank you.
Hi Lynn,
I don't think you can do that. Once the autonumber field has allocated a
number, it has been used and cannot be re-used if you delete the record. If
you don't want any gaps, you will have to not delete any records. If there
is a record you don't want, you will have to edit it instead of deleting it.
You can howver reset the autonumber fields as follows:
1) Delete the autonumber field.
2) Create a new autonumber field with the same name.
Problem is, if you already have some gaps, you are in a mess.
Also, I don't guarantee that the same numbers will be assigned to the same
records as they were before.
In any case, you should take a copy of your database before trying this.
Alternatively, if you want to keep the same numbers, but don't need an
autonumber:
1) Create a new field, type long integer.
2) Copy the numbers from the autonumber field to the new field.
3) Delete the autonumber field.
4) Rename the new field to the old name of the autonumber field.
If you do this, you will probably need some code added to generate new
numbers in this field for new records. The advantage is that you can ensure
that there are no gaps in the numbers.
David