How to Intilize Auto Number Field

N

NewsGroup

Dear Friends,

I am the new in this group, I have a problem that how to intilize the auto
number fields, If I want to restart auto number from 1, what i do ?

Please reply

Thanks

Waseem
 
A

Allen Browne

The AutoNumber starts from 1 by default.

If you have already had data in the table and deleted it, compact the
database to reset the seed:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

To programmatically set the Seed to a higher number, see:
http://allenbrowne.com/ser-26.html
http://allenbrowne.com/func-ADOX.html#ResetSeed

To programmatically delete the data and reset the seed:
http://allenbrowne.com/func-ADOX.html#DeleteAllAndResetAutoNum
 
O

Ofer Cohen

Compact and repair on the MDB where the table is located in will intilize the
auto number back to 1. but that if there are no records in that table.
 
Top