I have a table on a SQL Server back end, and my Access 2003 client connects to the table via ODBC. The table has an identity field (similar to AutoNumber) which serves as the table's primary key.
My problem is this: I have a form which is bound to this table. If I enter a new record and type in some data, then switch to another record, the original record is replaced with a record that already exists. For instance, let's say I create entry #11768. I switch to another record, and suddenly, entry #877 appears instead. Access is saving the new record properly, because I can close and reopen the form (or requery the data) and see the new record. What's more, it seems that (continuing the example) if I created entry #11769 (one higher), then entry #878 (one higher) appears instead!
This only happens when I insert a new record. If I modify an existing record, then switch, then I still see the record with its modifications.
This behavior occurs on every form and subform which is bound to this table. New records disappear and reappear, but edited records stay in place. This doesn't happen on forms bound to other linked tables.
I want to fix this problem without always requerying after adding records, and without resorting to VBA to programmatically add new records. How can I keep new records from disappearing?
My problem is this: I have a form which is bound to this table. If I enter a new record and type in some data, then switch to another record, the original record is replaced with a record that already exists. For instance, let's say I create entry #11768. I switch to another record, and suddenly, entry #877 appears instead. Access is saving the new record properly, because I can close and reopen the form (or requery the data) and see the new record. What's more, it seems that (continuing the example) if I created entry #11769 (one higher), then entry #878 (one higher) appears instead!
This only happens when I insert a new record. If I modify an existing record, then switch, then I still see the record with its modifications.
This behavior occurs on every form and subform which is bound to this table. New records disappear and reappear, but edited records stay in place. This doesn't happen on forms bound to other linked tables.
I want to fix this problem without always requerying after adding records, and without resorting to VBA to programmatically add new records. How can I keep new records from disappearing?