Welcome to Bytes, French Guy!
I'm afraid you're going to have to do a better job of explaining exactly what your situation is and what you're trying to do!
I am looking for the command that I have to include in the event procedure to reset automatically the autonumbering.
Autonumbers can be reset, but to my knowledge not thru a code. Your question makes me wonder about how you're trying to use this field. Autonumbers are intended to be used for one purpose and only one purpose, to provide a unique identifier for each record. Here's a post I've archived from a gentleman named John Vinson, MVP, explaining how autonumbers work:
When using Autonumber, do be aware that there will be gaps in the numbering - any record that's deleted will leave a gap; hitting <Esc> after starting a record will leave a gap; adding records using an Append query may leave a gap, often a huge one; replicating the database will make your invoice numbers random.
In short... it's best NOT to use Autonumbers for human consumption, and particularly not for consumption by accountants and auditors. Invoice sequences like 319, 321, 322, 385, 386, 221841246, -1083225152 make such people get very nervous.
Linq
;0)>
Moderator