how to make autonumber remember that i have just deleted a record

rvd48

Registered User.
Local time
Today, 21:08
Joined
Feb 2, 2004
Messages
123
i have been testing my database that i have built.
in the process i have deleted some customer records from my 'Customers' table.
my prblem is that Autonumber does not remember that i have deleted them when i add a new record.

e.g : currently: Autonumber | Name
--------------------1---------shelly
--------------------2---------martin

now if i delete martin and add a new name, the autonumber will put the new name as 3. e.g.

Autonumber | Name
----1----------shelly
----3----------Jake

how do i make it choose 2 instead of 3?
 
Last edited:
The autonumber is just a unique number for referring to your record. WHy would you need to order it?
 
After using access for a while you get used to missing autonumbers. In most cases they are hidden fields, and as Mile-O says, "The autonumber is just a unique number for referring to your record."
My advise is not to dwell on it and concentrate on other details.

Dave
 
I'll explain further:

When a new record is opened, it is assigned an autonumber (provided there's an autonumber field) and this is just a unique index given to the table. It's irrelevant to the other data involved within the table.

If you cancel the creation of that record then the number set aside is lost. Access asigns the next available number.

If you are caring for the number then you are probably using the relationships incorrectly as if you fix the number in one table then it doesn't update foreign keys (based on the autonumber) in other tables and will, therefore, through all your relationships off the mark.

To reclaim, some numbers you can compact the database. This will, at least, ensure that the next number, after any deletions, will follow on from the previous autonumber.
 
Is there a way to have two autonumber fields?
 
sandylt said:
Is there a way to have two autonumber fields?

Sorry, one autonumber field per table.


If you do a search for manual autonumbers, or something, there are some examples.
 

Users who are viewing this thread

Back
Top Bottom