I have a form [Emp_Edit] which lets you search for a record and then edit the fields it returns. I cannot get this form to save the changes. I get the error “The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.”
I have checked the underlying table and there are no conflicts. I think that the access is trying to save this as a new record instead of saving changes to the existing record. The form is based on the “Emp” table only. The form has seven fields. All are bound controls. 4 combo boxes and 3 text boxes. One of the combo boxes is [CboName]. It is this field that the user chooses a name and it then populates the rest of the controls. A text box [txtEmpID] is the PK and is auto populated by the selection in [CboName]. That all works fine, but as I stated, it won’t save the changes instead it is trying to save a new record. Thank you for your help.
I have checked the underlying table and there are no conflicts. I think that the access is trying to save this as a new record instead of saving changes to the existing record. The form is based on the “Emp” table only. The form has seven fields. All are bound controls. 4 combo boxes and 3 text boxes. One of the combo boxes is [CboName]. It is this field that the user chooses a name and it then populates the rest of the controls. A text box [txtEmpID] is the PK and is auto populated by the selection in [CboName]. That all works fine, but as I stated, it won’t save the changes instead it is trying to save a new record. Thank you for your help.