D
David H.
Our Access 2000 database (a front end to MSSQL2000 data) has two main tables
with a 1-1 relationship. Call them Client and Assessment. (Why? Mostly
just too many fields to fit in a single table.)
The main data entry form has lots of tabs; the first two tabs look at data
in Client, other tabs use both tables.
Users create a new record using a form which automatically creates records
in both, with the same primary key value (ClientID) in each table. The "New
Client" form then closes and opens the main form, and selects the new client.
They then start entering and saving data happily on tabs 1 and 2. But if
they continue to tab #3 (without closing and reopening that record) and try
to enter more data, they often get this error:
"ODBC call failed. Violation of Primary Key Constraint (PK_Assessment)
Cannot insert duplicate key in Object 'Assessment'." Any ideas why SQL
thinks I'm trying to insert a duplicate key? Any ideas (other than merging
two tables into one) for how to fix it? Thanks!
with a 1-1 relationship. Call them Client and Assessment. (Why? Mostly
just too many fields to fit in a single table.)
The main data entry form has lots of tabs; the first two tabs look at data
in Client, other tabs use both tables.
Users create a new record using a form which automatically creates records
in both, with the same primary key value (ClientID) in each table. The "New
Client" form then closes and opens the main form, and selects the new client.
They then start entering and saving data happily on tabs 1 and 2. But if
they continue to tab #3 (without closing and reopening that record) and try
to enter more data, they often get this error:
"ODBC call failed. Violation of Primary Key Constraint (PK_Assessment)
Cannot insert duplicate key in Object 'Assessment'." Any ideas why SQL
thinks I'm trying to insert a duplicate key? Any ideas (other than merging
two tables into one) for how to fix it? Thanks!