one form two tables (1 Viewer)

inbal

Registered User.
Local time
Today, 13:43
Joined
Feb 8, 2009
Messages
48
i have a form for adding new workers.
i need the information to be added into two different tables
(the same fields added into two tables)
how can i do it?
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:43
Joined
Aug 29, 2005
Messages
8,262
Unless there are some very exceptional circumstances, it is generally not good practice to store the same information in two locations in a relational database.
 

dreamz

Is God Like
Local time
Today, 21:43
Joined
Dec 21, 2005
Messages
48
I have the same problem.

What i'm thinking of doing is creating a query to update Table 2 from Table 1, then on my form have a submit button that when pressed, enters all the into into Table 1 and runs the query that updates Table2.

Unless anyone has a better/easier idea?
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:43
Joined
Aug 29, 2005
Messages
8,262
I have the same problem.

What i'm thinking of doing is creating a query to update Table 2 from Table 1, then on my form have a submit button that when pressed, enters all the into into Table 1 and runs the query that updates Table2.

Unless anyone has a better/easier idea?

Why do you need to store the same data in two tables :confused:
 

inbal

Registered User.
Local time
Today, 13:43
Joined
Feb 8, 2009
Messages
48
the main idea is to have two tables'
one is all our teachers from that table i can assign a teacher to a corse
and the other is all our contacts (teachers, workers, clients etc...)
 

dreamz

Is God Like
Local time
Today, 21:43
Joined
Dec 21, 2005
Messages
48
Why do you need to store the same data in two tables :confused:

They not identical tables. Some fileds are the same.

Table 1 - Name, Surname, Age, Comments, blah blah blah
Table 2 - Name, Surname, Age, Question 1,2,3,4,5,6, ect....


So some fileds are the same and i'm trying to save time by entering the same information in twice.

Unless you can suggest a different way?
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:43
Joined
Aug 29, 2005
Messages
8,262
The way I would do that is to have all my names in one table. I would within that table have a field called (for example) RoleID, in which the role of that person could be identified. This would also mean you would need an additional table with a list of roles the RoleID would be what you would store in the role field in your names table.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:43
Joined
Aug 29, 2005
Messages
8,262
They not identical tables. Some fileds are the same.

Table 1 - Name, Surname, Age, Comments, blah blah blah
Table 2 - Name, Surname, Age, Question 1,2,3,4,5,6, ect....


So some fileds are the same and i'm trying to save time by entering the same information in twice.

Unless you can suggest a different way?

I think you might benefit from reading up on normalisation, once you understand this you will understand why you don't need to the same data more than once.

Have a look at the DB I posted here, and you should start to see what's going on.
 

inbal

Registered User.
Local time
Today, 13:43
Joined
Feb 8, 2009
Messages
48
its a little more complicated than that...
for example, when i add a new school as a client i add the school info and the contact info, i need them bothtogether in the list of schools and seperate in the contact list
 

John Big Booty

AWF VIP
Local time
Tomorrow, 06:43
Joined
Aug 29, 2005
Messages
8,262
its a little more complicated than that...
for example, when i add a new school as a client i add the school info and the contact info, i need them bothtogether in the list of schools and seperate in the contact list

I think you might benefit from reading up on normalisation, once you understand this you will understand why you don't need to the same data more than once.

Once you understand the principal of normalisation, you will see why you don't need to store the same data more than once. In fact storing the same data more than once will in the long run cause you far more problems than it solves.
 

Users who are viewing this thread

Top Bottom