Adding new records to multiple tables.

N

Nad

Hi Guys,
I have four tables.Each table has a common field 'Project Number' (with
primary Key).I didn't make relationship between the tables.
I want to create a form to add new record for one table but the new 'project
Number' should add to the other three tables.
Not sure how to proceed about this. Any help would be appreciated.
Please... help.
 
B

BruceM

Your wanting to add the same field to four tables suggests they are related
in some way, so most likely the way to proceed is to create relationships.
Do you intend to add the ProjectNumber only to the other three tables? To
what end?

It would help if you post some information about the real-world situation
behind the database, and the information you intend to keep in the four
tables.
 
J

John W. Vinson

Hi Guys,
I have four tables.Each table has a common field 'Project Number' (with
primary Key).I didn't make relationship between the tables.

Why not?
I want to create a form to add new record for one table but the new 'project
Number' should add to the other three tables.

Why should you?
Not sure how to proceed about this. Any help would be appreciated.
Please... help.

You don't NEED empty "placeholder" records in the related tables. A new record
can be created when there is information to put into it - not before!
Typically there would be one "master" Projects table with Project Number as
the primary key, related one-to-many to one or more "child" tables with
Project Number as a foreign key. One to one relationships (between two tables
both with Project Number as the Primary Key) do exist - but unless you're
familiar with the terms "Subclassing" or "Table Driven Field Level Security"
you probably DON'T want such relationships.

What are the four tables? What are some representative fields? What real-life
Entities (people, events, things) do these tables represent?
 
N

Nad

Sorry i could not explain u properly & i was out of my office for two days so
i didn't responce u on time.
Let me explain the real situation.
The four tables are: 1) tblProjects (say master table) & the entities are
prj#,prjName,PrjEngineer,Plant,prjScope...(25 entities) 2) tblProjectBudget &
the four entites are prj#,ActualBudget,Commitment... 3) tblProjectDate,
entites are Project#,StartDate,CompletionDate,TECoDate...15entites & the last
4) tblPrjFeepData (with 10entites).
I made a frmPrjUpdate putting all the entites from all the tables to udate
the table based on query & its working fine.
Now i want to make a form to add new project with few information
(Proj#,PrjName,PrjEngineer,StartDate,Budget,Feepdate) involving entites from
all the 4 table. Engineer will udate rest of the information through udate
form.
hoping this time i could explain to u.
Thanks for your reply.
 
J

John W. Vinson

Sorry i could not explain u properly & i was out of my office for two days so
i didn't responce u on time.
Let me explain the real situation.
The four tables are: 1) tblProjects (say master table) & the entities are
prj#,prjName,PrjEngineer,Plant,prjScope...(25 entities) 2) tblProjectBudget &
the four entites are prj#,ActualBudget,Commitment... 3) tblProjectDate,
entites are Project#,StartDate,CompletionDate,TECoDate...15entites & the last
4) tblPrjFeepData (with 10entites).
I made a frmPrjUpdate putting all the entites from all the tables to udate
the table based on query & its working fine.
Now i want to make a form to add new project with few information
(Proj#,PrjName,PrjEngineer,StartDate,Budget,Feepdate) involving entites from
all the 4 table. Engineer will udate rest of the information through udate
form.

Use a Form based on tblProjects, with four subforms based on the four other
tables. The Budget for a project shouldn't have any data until *there is a
Project*, so there is no need - in fact it's a bad idea! - to prefill the
table.

Your tables seem awfully wide and perhaps not properly normalized. I don't
have any idea what your acronyms mean, but the information should be stored
only once, not copied from project to project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top