G
Guest
I have a table (Table1) with two fields (recID, title) in an Access 2000 file
format database. The recID is AutoNumber and a Primary Key.
If I use the append query "INSERT INTO Table1 ( recID ) SELECT 1199" to
insert a record, it works fine (assuming a record with that ID does not
exist). I then add records to the same table manually and discovered
different behavior depending upon whether the table is native to the database
or is linked to the database.
In my example, assume that my table has records for 1, 10, and 20. I then
use the query to add a record for 11 and then add a new record manually to
the table. Here is the difference. If the table is a native table, the next
record becomes 21 (desired behavior). If the table is a linked table, the
next record becomes 12 (undesired behavior).
Can someone confirm this behavior. I want the next added record for a
linked table to have an ID that is 1 greater than the highest current ID
regardless of the ID of the previously added record. Is there an easy
solution? My alternative is to query for the highest current ID then add a
record using that ID + 1 in the INSERT query.
This behavior is the same for 2003 database format. Access 97 behaves the
way that I expect. Is using an Access 97 database my answer? That seems
like regression. Am I missing something?
format database. The recID is AutoNumber and a Primary Key.
If I use the append query "INSERT INTO Table1 ( recID ) SELECT 1199" to
insert a record, it works fine (assuming a record with that ID does not
exist). I then add records to the same table manually and discovered
different behavior depending upon whether the table is native to the database
or is linked to the database.
In my example, assume that my table has records for 1, 10, and 20. I then
use the query to add a record for 11 and then add a new record manually to
the table. Here is the difference. If the table is a native table, the next
record becomes 21 (desired behavior). If the table is a linked table, the
next record becomes 12 (undesired behavior).
Can someone confirm this behavior. I want the next added record for a
linked table to have an ID that is 1 greater than the highest current ID
regardless of the ID of the previously added record. Is there an easy
solution? My alternative is to query for the highest current ID then add a
record using that ID + 1 in the INSERT query.
This behavior is the same for 2003 database format. Access 97 behaves the
way that I expect. Is using an Access 97 database my answer? That seems
like regression. Am I missing something?