Reclaim Autonumbers??

MediaDoc

Registered User.
Local time
Today, 06:16
Joined
May 4, 2002
Messages
25
Hi,

Interesting question from client. I have a DB that generates 'service call numbers' via an +1 increment autonumber.

They want their reports to show client service call number, but dont want to see any unused reg. numbers. (ie. the want to see 1,2,3,4 not 1,4,5 etc..)

This happens when using the form, they enter a client, then realize they have made an error (i.e. entered on wrong form etc.) and want to delete the record. When they enter the next client, the autonumber has gone up by one, despite the fact they deleted the previous service call.

Dont think this is possible, but I have been known to be wrong now and again :-)

Thanks,

Matts
 
You might not like this idea, but it will probably work.

When you delete all rows from a table and compact it, AutoNumber variables are reset to one.

I don't know if this applies to the last used value in a non-empty table. You can test easily enough by manaully inserting a row, deleting the row, and then compacting the table. Then add a new row and see if the "missing" number is re used.

If so, you could compact the table via code after an add is cancelled.

HTH,
RichM
 
You have to use a custom numbering system if you don't want to use RichM's method. It's DMax+1, there have been many posts here regarding this method.
 

Users who are viewing this thread

Back
Top Bottom