Here is what I need to accomplish:
Table 1: Quotes - fields: PK=QuoteID, QuoteNumber, Desc - (there is only one record that needs to be copied)
Table 2: QuoteDetails - fields: PK=QuoteDetailsID, FK-QuoteID, Desc, Qty, Price - (there are multiple records that need to be copied)
Table 3: QuoteAccesories - fields: PK=QuoteAccID, FK=QuoteDetailsID, Desc, Qty, Price - (there are multiple records that need to be copied.
These tables are related by the obvious fields shown.
The description for both the QuoteDetails and the QuoteAcc tables typically have strings with this type of info - 2'-4" long x 4'-6" wide
I need to copy the related records from all three tables using QuoteNumber (or even QuoteID if that's easier) to an Orders set of tables with the same fields (but there are other fields as well.)
I have been struggling to get the code in previous thread I had posted with to work past the initial Quote table being copied to the order table - in other words no QuoteDetails records or QuoteDetailAcc records are getting inserted to the appropriate orders tables.
My original code is flawed because when you get to the accessories Loop part of the code my recordset is not correct and I do not know how to build it correctly.
But I have even removed that accessories Loop portion of code and cannot get the QuoteDetails part of the code to work.
I am posting the code here just to show what my attempt was but I am thinking there has to be another way to accomplish my goal.
any help would be greatly appreciated.
My code from the first attempt will be posted next.
Table 1: Quotes - fields: PK=QuoteID, QuoteNumber, Desc - (there is only one record that needs to be copied)
Table 2: QuoteDetails - fields: PK=QuoteDetailsID, FK-QuoteID, Desc, Qty, Price - (there are multiple records that need to be copied)
Table 3: QuoteAccesories - fields: PK=QuoteAccID, FK=QuoteDetailsID, Desc, Qty, Price - (there are multiple records that need to be copied.
These tables are related by the obvious fields shown.
The description for both the QuoteDetails and the QuoteAcc tables typically have strings with this type of info - 2'-4" long x 4'-6" wide
I need to copy the related records from all three tables using QuoteNumber (or even QuoteID if that's easier) to an Orders set of tables with the same fields (but there are other fields as well.)
I have been struggling to get the code in previous thread I had posted with to work past the initial Quote table being copied to the order table - in other words no QuoteDetails records or QuoteDetailAcc records are getting inserted to the appropriate orders tables.
My original code is flawed because when you get to the accessories Loop part of the code my recordset is not correct and I do not know how to build it correctly.
But I have even removed that accessories Loop portion of code and cannot get the QuoteDetails part of the code to work.
I am posting the code here just to show what my attempt was but I am thinking there has to be another way to accomplish my goal.
any help would be greatly appreciated.
My code from the first attempt will be posted next.