Multiple forms and sub-tables in a single view |
Perhaps a different sequence of data collection would make this easier. Collect the items first and associate them to an 'orders' table entry later. Here's what I mean.
On the stand-alone 'items' view change the "Save Details" button to "Place Order" which, when clicked, opens the name/email view. On that screen change "Save Details" to "Continue". That click creates the 'orders' table entry saving the name/email data along with the foreign key value you've been using to group the items. Once saved, you go to a previously undiscussed "complete order" view. Clearly the foreign key value - in 'orders' pointing to 'order_items' - cannot be taken from an auto-increment field of the 'orders' table' but will instead have to be generated during the item selection process. Garbage collection of unordered items can be accomplished by checking the 'order_items" table for records where the 'order_number' column is not found in the 'orders' table. When to do GC however is an interesting question. I assume you already have a scheme for clearing orders+items that never actually get ordered. |
Messages In This Thread |
Multiple forms and sub-tables in a single view - by CINewb - 10-28-2017, 05:19 AM
RE: Multiple forms and sub-tables in a single view - by dave friend - 10-28-2017, 07:11 AM
RE: Multiple forms and sub-tables in a single view - by CINewb - 10-30-2017, 02:34 AM
RE: Multiple forms and sub-tables in a single view - by JeffreyB - 11-18-2017, 09:00 AM
RE: Multiple forms and sub-tables in a single view - by PaulD - 11-18-2017, 11:25 AM
RE: Multiple forms and sub-tables in a single view - by InsiteFX - 11-18-2017, 12:22 PM
RE: Multiple forms and sub-tables in a single view - by ivantcholakov - 11-18-2017, 06:51 PM
|