insert new records in another table
I am working on creating an Invoice database. Here's my attempt:
I enter data in Invoice Table.
Through a Join Table, I retrieve Customer wise prices for distinct products.
Currently, it works like this:
1. I create a new customer in the "Customer" table. I enter some products and their prices in the "Customer Table" through a portal of Join Table.
2. Then I go to "Invoices" table. I enter the customer ID. Lookup finds the Customer Name for this ID. I enter Item Names in "Line Items" table. Lookup retrieves prices for that Item Name for the Current Customer through the Join table. A script "Update Price" executes if I change the "retrieved price" and the new price is placed in the Join Table.
Now, I want to insert new records in Join Table if I enter a new record (I mean item names which do not already exist in Join table) in the Line Item table. The new item nam, eassociated price of the new item and the current customer ID must be part of that record.