error on updating subform Access 2010
<p>I have a main form and a sub form in a datasheet view. They are linked through 2 ID fields which form the primary key for the table attached to the main form.</p>

<p>I call the main form the first time to insert records in to the DB and then call it later to update the records. I'm able to update the record on the main form but as I click on the subform I get an error saying <code>"Cannot perform cascading fucntion. It would result in a duplicate key in table"</code></p>

<p>Curiously, I do not get this error when I try to update the data in the first record in the database.</p>

<p><strong>Relationships</strong></p>

<p><a href="https://i.stack.imgur.com/HWdy3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HWdy3.png" alt="enter image description here"></a></p>

<p><strong>Subform properties</strong></p>

<p><a href="https://i.stack.imgur.com/yCXYf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yCXYf.png" alt="enter image description here"></a></p>