View Full Version : I have a problem


prabirsenuk
05-15-2007, 08:27 AM
Hi All:

I need help with 'AutoNumber'.

I have set a field to autonumber, with a format "ps-1"000. The problem is that when I delete the table and start fresh, the autonumbering starts from where it left. If the last autonumer was ps-1003, when I start afresh after deleting the table data, it starts from ps-1004.

I need to reset that to start from ps-1001. I need help in that on how to.

Thanks & Regards - Prabir.

The_Doc_Man
05-15-2007, 08:36 AM
If you have requirements on the AUTONUMBER field, it ceases to be proper to be an autonumber. Autonumbers are designed to be unique record identifiers generated by Access. BUT... they might as well be randomly generated. You cannot rely on them to have any particular order or any particular distribution when taken as a group.

Look up "Sequence number" using this forum's SEARCH functions to see many articles (MANY articles) on this topic.

prabirsenuk
05-15-2007, 08:44 AM
Hi:

Thank you for your response. I have set it for 'Incremental' not random. The point is that, after trying out my sqls on that table, in conjunction with others, I want to delete all the data from that table, and return the autonumber to start from ps-1001, instead of starting from the last number that it had before I deleted the data.

Thanks - Prabir.

The_Doc_Man
05-15-2007, 08:48 AM
My original statement stands.

However, if you erase the table and then do a compact/repair, I believe it will reset the autonumber. If not, then search this forum for autonumber articles. They are legion.

prabirsenuk
05-15-2007, 08:54 AM
Hello:

Thanks it works that way. Much obliged.

Regards - Prabir.