J
Jim Franklin
Hi,
I have two identical tables, which each have an Autonumber field,
Movement_ID as the primary key. I have a query which should simply append
the records from tbl2 into tbl1. I have left the Movement_ID field out of
the query, so Access should generate the numbers automatically for tbl1.
However, when I run the query, I get a key violation. Investigating, I
removed the tbl1 primary key index, allowing duplicates in my Movement_ID
field and re-ran the query. It appended the records, but put the values 46 -
49 (there are 4 records in this example) in my AutoNumber field, even though
there are some 2000 records in tbl1 and ID's 46-49 already exist.
If I run the query again and again, the Movement_ID's of the appended
records increase accordingly, e.g. 50-53, 54-57 etc.
The existing records for tbl1 are created programmatically using VBA, rather
than manually input, although the Movement_ID is still generated by Access.
Could this be something to do with it?
As always, any help is greatly appreciated!
Cheers,
Jim
I have two identical tables, which each have an Autonumber field,
Movement_ID as the primary key. I have a query which should simply append
the records from tbl2 into tbl1. I have left the Movement_ID field out of
the query, so Access should generate the numbers automatically for tbl1.
However, when I run the query, I get a key violation. Investigating, I
removed the tbl1 primary key index, allowing duplicates in my Movement_ID
field and re-ran the query. It appended the records, but put the values 46 -
49 (there are 4 records in this example) in my AutoNumber field, even though
there are some 2000 records in tbl1 and ID's 46-49 already exist.
If I run the query again and again, the Movement_ID's of the appended
records increase accordingly, e.g. 50-53, 54-57 etc.
The existing records for tbl1 are created programmatically using VBA, rather
than manually input, although the Movement_ID is still generated by Access.
Could this be something to do with it?
As always, any help is greatly appreciated!
Cheers,
Jim