Hey folks I have a Customer Table CC_Customer with an associated form page. After adding a record on the form page I would like to Auto Insert Records into another table called CC_CustomerDisc
CC_CustomerDisc table looks like this:
Customer_Number - This is the unique ID for the newly added customer
Disc_ID - This is the ID associated to a table called CC_DiscCat. This table contains discount that each customer is eligible to receive
When a New Customer is added I would like CC_CustomerDisc table to be auto populated for example
New Customer gets added. The Customer_Number = 100
Then loop through the various CC_DiscCat records (in this case there are about 17 categories) and insert the Customer_Number along with each Disc_ID as a separate record. Alternatively I could use a button on the new page that says Add Customer Discounts. HOWEVER to prevent from hitting the button multiple times, there needs to be code that checks to see if the Customer_Number already exists. If it does then maybe dont even display the button. Not sure
CC_CustomerDisc (table)
Customer_Number | Disc_ID
100 | 1
100 | 2
100 | 3
100 | 4
100 | 5
100 | 6
100 | 7
100 | 8
100 | 9
100 | 10
100 | 11
100 | 12
100 | 13
100 | 14
100 | 15
100 | 16
100 | 17