I think I understand your situation (a bit difficult to follow indeed) but the problem might be here:
> If I create more than one record in blockB
With a master-detail, you have to save the master and detail data before continuing to another master record. So, you cannot enter several records in blockB and several records in blockC at the same time.
I wonder, did you never get a "do you want to save the changes" message when going from one record in blockB to the next?
Thank you very much for taking the time to respond. Yes you are correct I do get the 'do you want to save changes' message when going from one record in blockB to another if I am entering details in blockC.....I am incorrectly using a master-detail relationship when I must need to approach this programmatically although I am not sure how?
I don't know if creating blocks based on procedures would circumvent the "do you want to save...". I never tried it, but I don't think so. Maybe someone with experience in that area can give an answer.
In your case I would do a POST before moving to another record. A POST sends the data to the database, but without a commit. You can still rollback the changes if needed.
So doing a POST allows for moving between the records ok without getting the "do you want to save...." message, however the original problem still exists in that I am unable to check for an existence of a record in blockC once I have saved the first record ie the form will let me exit without ensuring there is a corresponding record in blockC for EVERY record in blockB where the adtype = 'P'?
Any ideas? This is really quite important and I'd really appreciate any further suggestions of things to try or potential solutions?
Many Thanks in advance
Before issuing the POST, check if there are details in blockC for that master record in blockB.