I think i can understand what is happening here but not how to solve it.

The issue lies with the design of the table but I am not sure whether I can change this, as a lot of other functionality is based on this apart from the fact that there are thousands of records that were updated\audited.

I have a claim record that could be rejected for a particular reason. A new requirement was requested that the system will still allow for a main requirement to be selected however the user will have the option to add more reasons (Table C) (amongst other tables for more added functionality but these are irrelevant to the issue in hand).

When the user opt to reject a claim, a new record is created in the Claim Rejection Table (Table C). I added a cDbCJGrid to allow the entry of more records here. I can add more records in the DBGrid. The first record seems to overwrite the one that is related to the Claim Table.

When I double click on the record to show more details and save it, a 'Duplicate Record' error is created. I think this is happening because somehow the Claim Rejection Record which is linked to the claim table is trying to be recreated. When I use the file buffers the record is updated as it should.

Table A - Claim Table
Claim No
Policy No
Claimant No
Main Rejection_Code (FK to table rejection Codes Table)
A no of other fields

Table B - Rejection Codes Table
Reject_Code
Description

Table C - Claim Rejections
Claim No
Policy No
Claimant No
Rejection_Code (FK to table rejection Codes Table)
Customised Wording