A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Autofill Table2 when new record created in Table1



 
 
Thread Tools Display Modes
  #1  
Old December 27th, 2006, 05:20 PM posted to microsoft.public.access.forms
JD
external usenet poster
 
Posts: 199
Default 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  
Old December 27th, 2006, 07:33 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old December 27th, 2006, 07:39 PM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default 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  
Old December 28th, 2006, 01:46 PM posted to microsoft.public.access.forms
JD
external usenet poster
 
Posts: 199
Default 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  
Old December 28th, 2006, 01:46 PM posted to microsoft.public.access.forms
JD
external usenet poster
 
Posts: 199
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.