If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Autofill Table2 when new record created in Table1
I have three tables as listed below:
Table1 Table 2 Table3 TrackingNumber TrackingNumber ItemDescription Name Item Address Qty LineNumber In CustomerInfo the Tracking Number is the Primary Key. In OrderDetails, the LineNumber is the Primary Key. When a new record is created in Table1 I need to populate several lines of data into Table2 automatically. This was an afterthough from management and I am not sure how to accomplish this task. They want there to be 60 default items with not quantities. Any suggestions on how to accomplish this on an existing database? -- JD |
#2
|
|||
|
|||
Autofill Table2 when new record created in Table1
I'm somewhat confused by the table structure (as displayed in my newgroup
reader). I don't understand how "table1, table2, and table3" are related to CustomerInfo, OrderDetails, and ??? Another way to depict your table structure without risking issues with tab/display would be: Table1 TrackingNumber (PK) Name Address Table2 TrackingNumber (PK) Item Qty LineNumber Table3 ItemDescription (?PK) The implication of the above structure is that table1 and table2 have a one-to-one relationship, which doesn't seem to match what you are describing. More info, please... Regards Jeff Boyce Microsoft Office/Access MVP "JD" wrote in message ... I have three tables as listed below: Table1 Table 2 Table3 TrackingNumber TrackingNumber ItemDescription Name Item Address Qty LineNumber In CustomerInfo the Tracking Number is the Primary Key. In OrderDetails, the LineNumber is the Primary Key. When a new record is created in Table1 I need to populate several lines of data into Table2 automatically. This was an afterthough from management and I am not sure how to accomplish this task. They want there to be 60 default items with not quantities. Any suggestions on how to accomplish this on an existing database? -- JD |
#3
|
|||
|
|||
Autofill Table2 when new record created in Table1
On Wed, 27 Dec 2006 09:20:00 -0800, JD
wrote: I have three tables as listed below: Table1 Table 2 Table3 TrackingNumber TrackingNumber ItemDescription Name Item Address Qty LineNumber Word wrap and apparently oversights on your part made this unreadable. Please repost, maybe in the format Tablename Fieldname Primary Key AnotherField datatype AnotherField datatype AnotherTableName Fieldname Primary Key AnotherField ... In CustomerInfo the Tracking Number is the Primary Key. In OrderDetails, the LineNumber is the Primary Key. When a new record is created in Table1 I need to populate several lines of data into Table2 automatically. This was an afterthough from management and I am not sure how to accomplish this task. They want there to be 60 default items with not quantities. Any suggestions on how to accomplish this on an existing database? This is almost NEVER a good idea. If EVERY record in CustomerInfo has 60 records in (OrderDetails? It's confusing when you go back and forth from table names to Table1), you're really just wasting lots of space. What is the purpose of these 60*number of customers rows??? In my experience, putting default "placeholder" records into a table is a recipe for trouble. They *never* get updated or corrected. John W. Vinson[MVP] |
#4
|
|||
|
|||
Autofill Table2 when new record created in Table1
again, sorry. I will repost. Thanks
-- JD "John Vinson" wrote: On Wed, 27 Dec 2006 09:20:00 -0800, JD wrote: I have three tables as listed below: Table1 Table 2 Table3 TrackingNumber TrackingNumber ItemDescription Name Item Address Qty LineNumber Word wrap and apparently oversights on your part made this unreadable. Please repost, maybe in the format Tablename Fieldname Primary Key AnotherField datatype AnotherField datatype AnotherTableName Fieldname Primary Key AnotherField ... In CustomerInfo the Tracking Number is the Primary Key. In OrderDetails, the LineNumber is the Primary Key. When a new record is created in Table1 I need to populate several lines of data into Table2 automatically. This was an afterthough from management and I am not sure how to accomplish this task. They want there to be 60 default items with not quantities. Any suggestions on how to accomplish this on an existing database? This is almost NEVER a good idea. If EVERY record in CustomerInfo has 60 records in (OrderDetails? It's confusing when you go back and forth from table names to Table1), you're really just wasting lots of space. What is the purpose of these 60*number of customers rows??? In my experience, putting default "placeholder" records into a table is a recipe for trouble. They *never* get updated or corrected. John W. Vinson[MVP] |
#5
|
|||
|
|||
Autofill Table2 when new record created in Table1
I am so sorry. I will repost with a clearer question.
Thanks -- JD "Jeff Boyce" wrote: I'm somewhat confused by the table structure (as displayed in my newgroup reader). I don't understand how "table1, table2, and table3" are related to CustomerInfo, OrderDetails, and ??? Another way to depict your table structure without risking issues with tab/display would be: Table1 TrackingNumber (PK) Name Address Table2 TrackingNumber (PK) Item Qty LineNumber Table3 ItemDescription (?PK) The implication of the above structure is that table1 and table2 have a one-to-one relationship, which doesn't seem to match what you are describing. More info, please... Regards Jeff Boyce Microsoft Office/Access MVP "JD" wrote in message ... I have three tables as listed below: Table1 Table 2 Table3 TrackingNumber TrackingNumber ItemDescription Name Item Address Qty LineNumber In CustomerInfo the Tracking Number is the Primary Key. In OrderDetails, the LineNumber is the Primary Key. When a new record is created in Table1 I need to populate several lines of data into Table2 automatically. This was an afterthough from management and I am not sure how to accomplish this task. They want there to be 60 default items with not quantities. Any suggestions on how to accomplish this on an existing database? -- JD |
Thread Tools | |
Display Modes | |
|
|