118600
As suggested by Zameer, just add the Autonumber field to the "new" table, and make it the primary key. When you add the records to the new table using an Append Query, the AutoNumber will generate a new number.
...However, I am puzzled by this request.
Benefit: Whenever there will be a record added in the old table there will be a changed in new table as well with new generated autonumber.
Perhaps this is symantics, but the autonumber will ONLY be generated in the new table. And how will you link the old table to the new table? And how will you maintain your links with the new table to any of the related tables the old table is linked / related to?
Note that a common issue is that those new to Access want the Autonumber to always be sequential with no missed records. There are several issues here...
- The purpose of autonumber to provide a simple way on uniquely identifying each record. The sequential nature is only a cosmetic thing -- the autonumber should not have any meaning for the actual record. If the identifying "number" is to have meaning, then you should use another mechanism
- Autonumbers are generated when you start the OnInsert event. It therefore has two problems -- the user can cancel out of the process of entering a number, and if two people are entering a record at the same time, there is a chance that both users will grab the same number.
- What happens when you delete a record or purge a lot of records? The DCount will fail, and trying to maintain the sequential numbers with autonumber will also experience problems.
You will probably have more questions.
Richard