Hi, I’m trying to edit a table using a form that allows the user to choose the record they want to edit. The form should display the record’s original data and allow the user to enter the new data in data entry fields. The table connected to the form has two columns, one being the primary key called Abbr and the other a description. Both fields are text. An example of the data contained is Abbr “CEO”, description “Chief Executive Officer”. I plan on using a save record command button to finish the edit. I do not know programming so I’ve been struggling with available options in Access.
What I’ve been able to do so far is use a form with a subform. In the form I created a text box with the Abbr being displayed. In order to change the value in the Abbr text box I created a combo box that allows me to choose the Abbr values in the table. I do not know why this works. The subform has a parent child relationship set to the Abbr field. I could not get the combo box to change the subform records so I had to create the Abbr field in addition to the combo box. In the sub form the record displays but I cannot edit the fields because an error displays saying “The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, …”. I set the form properties to not allow data entry and not allow new additions. All I want the user to be able to do is edit records in a form environment.
I think the combo box alone should be sufficient to change the record in the subform. I could also use the combo box to display the original data and edit or delete the data in the subform. Thanks in advance for the help.