I want to reset an autonumber field in a table each time it is populated. Step 1 will be to delete the existing contents. Step 2 will be to append the new records where I want the field to be populated starting with 1. One way would be to delete the data then compact and repair, but I don't want to do this. Everry other way I can think of seems like more of a headache. Here's something that might work. I've created an empty table "x" and written this short procedure.
Code:
Private Sub cmdNewTable_Click()
DoCmd.DeleteObject acTable, "xx"
DoCmd.CopyObject , "xx", acTable, "x"
End Sub
Now that I see it I sort of like it, but is there another way to simply reset the autonumber in an existing table?
Thanks for listening.
Paul