Please follow the links below to see the visual stuff, it will help!
I have the start of a system that redeems promotions for customers. Here is the portion of the relationships we are concerned with now:
Does anything look bad there?
Each customer can redeem a single promotion once, but may redeem many different promotions. Each promotion may have sub promotions. An example would be a promotion for Beef: Buy a case of Rib eye, get $10, and/or buy a case of Rump roast and get $4. You can see promotions working here:
So far no problems. Now I want to create some redemptions. Here is the beginning of the Redemptions form:
You can see that the main form has two similar sub forms. The top form queries to find the related sub promotions matching the promotion selected in the upper right hand corner. That works fine. However, I need to be able to enter the quantity the customer is redeeming for each sub promotion. I need to store that value for the combination of Redemption ID, Promotion ID and Sub Promotion ID. You can see what the form should look like in the lower sub form. However, I populated the table manually.
I need to be able to store the quantities, as in the second sub form from the main form. I need to do this in the following way: Go to Redemption Form (Get new Redemption ID), Choose Customer (Get Customer ID), Choose Promotion (Get Promotion ID), sub form displays the related Sub Promotions and has the input boxes to enter in the quantity for each sub promotion.
Here is the SQL code for each of the sub forms:
Please help! Many thanks.
I have the start of a system that redeems promotions for customers. Here is the portion of the relationships we are concerned with now:
Does anything look bad there?
Each customer can redeem a single promotion once, but may redeem many different promotions. Each promotion may have sub promotions. An example would be a promotion for Beef: Buy a case of Rib eye, get $10, and/or buy a case of Rump roast and get $4. You can see promotions working here:
So far no problems. Now I want to create some redemptions. Here is the beginning of the Redemptions form:
You can see that the main form has two similar sub forms. The top form queries to find the related sub promotions matching the promotion selected in the upper right hand corner. That works fine. However, I need to be able to enter the quantity the customer is redeeming for each sub promotion. I need to store that value for the combination of Redemption ID, Promotion ID and Sub Promotion ID. You can see what the form should look like in the lower sub form. However, I populated the table manually.
I need to be able to store the quantities, as in the second sub form from the main form. I need to do this in the following way: Go to Redemption Form (Get new Redemption ID), Choose Customer (Get Customer ID), Choose Promotion (Get Promotion ID), sub form displays the related Sub Promotions and has the input boxes to enter in the quantity for each sub promotion.
Here is the SQL code for each of the sub forms:
Please help! Many thanks.