Script for inserting field contents from one table to another
I have two tables with three fields in common.
Table one is Inspection Plan. Each inspection plan has it's own unique identifier (QIPID).
Table two is Inspection Results
The relationship is 1 - many from Inspection plan to Inspection results
The duplicate fields are "item" and "description"
I need to setup a script that I can trigger using a button on the inspection results form that will retrieve the entries for QStepID, item and description from the inspection plan, and insert them as new records into the related fields in inspection results. The filter used to select the which fields to retrieve will be QIPID. mentioned above.
I realise that this duplicates data within my database however, without going into length details, this is actually necessary.
I have tried as best I could to look through the reference manual etc. and online, but I cannot find an example to copy. I would really appreciate if anyone could help me out with a script for this.