Hello again
First point to note, you will have to recreate your form from scratch if you now need to link it to a database, unless you are using something like QDabra Database Accelerator that allows this functionality. Make sure your tables are set out as below before starting the redesign.
You need to add a couple of fields to your CustProduct table like @PName, @UnitPrice, @Quantity and @Total, that way all the fields displayed on the form are recorded in the database. Oh, and you will need to add @GrandTotal to the Customer table.
To get this set up on the form you add the Customer table as the main table in the main data connection then add the CustProduct table linking the field CustomerID on the Customer table to CustomerID on the Cust Product table, this way, for each 1 line in Customer the form can have many lines in Cust Product.
Now you have linked in your database tables, you can redesign the form and link your repeating table to CustProduct table and delete out @CPID, @Customer ID and @Product ID from the form as the person filling in the form does not need to see these fields.
So I fill in the form now by entering my First Name into @CFName text box, my Last Name into @CLName. I then add my products into the repeating table bound to CustProduct, press submit and the @CFName, @CLName and @Customer ID are submitted to the Customer table and all the other fields are submitted to Cust Product.
Cheers