Hi,
I'm using Access 2010. I have created a table and a form to enter new records into the table. The form is controlled by a combo box. In the combo box, I can enter a new value for the primary key and fill out the rest of the form to create a new record.
Alternatively, I can select an existing value of the primary key from the combo box. When I select an existing primary key from the combo box, I have written an Event Procedure that runs "On Change". The procedure loads the values for the chosen record directly into the form.
Once I've loaded an existing record into the form, I would like to change the value of one of the fields and then update the record. However, Access does not let me do this because it says that it would create a new record and I can't have duplicate primary keys.
How do I simply update the record in the form after loading existing values it rather than duplicating the record?
I'm using Access 2010. I have created a table and a form to enter new records into the table. The form is controlled by a combo box. In the combo box, I can enter a new value for the primary key and fill out the rest of the form to create a new record.
Alternatively, I can select an existing value of the primary key from the combo box. When I select an existing primary key from the combo box, I have written an Event Procedure that runs "On Change". The procedure loads the values for the chosen record directly into the form.
Once I've loaded an existing record into the form, I would like to change the value of one of the fields and then update the record. However, Access does not let me do this because it says that it would create a new record and I can't have duplicate primary keys.
How do I simply update the record in the form after loading existing values it rather than duplicating the record?