Forum Home
Press F1
 
Thread ID: 21830 2002-07-05 00:57:00 Access tables and autonumber tbacon_nz (865) Press F1
Post ID Timestamp Content User
59996 2002-07-05 00:57:00 Is it possible to reset an autonumber field in a table so it starts again from 1? If so, how do you do it? Presumably the table would have to be empty before it could be attempted. tbacon_nz (865)
59997 2002-07-05 01:56:00 nope delete the original coloumn and just reindex it mutts (790)
59998 2002-07-05 03:07:00 Yup Mutts is correct, you cant reset the numbers as such. If your table does not contain any records, simply compacting the database again will set the Autonumber field back to 1. Another way would be to delete the AutoNumber field and re-insert it in the table. Of course when you delete records your back to the problem of numbers not being consecutive.

Alternatively you could create your own autonumber which remains consecutive but requires some code to be written. Have a look at www.applecore99.com if you are comfortable with VBA.

I would suggest retaining an AutoNum plus creating your own field for numbering depending upon how important it is for you.
parry (27)
59999 2002-07-05 06:19:00 Thanks guys, you've confirmed what I suspected, although I didn't know that compacting would reset it. It looks like I might be having to do it the hard way :-( tbacon_nz (865)
1