Autonumber

samo

New member
Local time
Today, 12:53
Joined
Oct 14, 2005
Messages
7
Can any body help please

Is there any way you could renumber the autonumber, I have deleted some records in my table and the numbering orders have a gap and I would like the numbers to rearange automatically as the record or records are deleted.

Thank you.
 
It is possible to renumber the autonumber, but not straightforward.

However there are two issues with what you are trying to do
1. Autonumbers will continually give rise to gaps in a multiuser environment when users start to create new records and then abandon them. It is never recommended that you use an autonumber to create a field that has meaning to the user. Autonumbers are really meant to create a unique reference that is used internally in the application.
2. Renumbering orders is a strange thing to do. The whole point of having an order number is to provide a single identifiable ID that the supplier quotes back to the orderer to provide a link between the supplier's documentation and the orderer. Once a number is allocated, it should never change.

It would be reasonable to allocate order numbers in a way that ensures that the current number is sequential with the preceding order, i.e. if you start an order and abandon it, providing another order has not just been created, you reuse the number next time. You would use Dmax() to find the highest number already issued. This has been covered in these forums before so do a search.
 
Thankyou Neileg
I am going to try it thanks a lot again
 

Users who are viewing this thread

Back
Top Bottom