Transfer Form Data into Table

T

TAWise

I have a very simple database that is using three tables/three forms. All
three are linked by a field called EmployeeNumber. I have two command
buttons (macros which set the "EmployeeNumber" as criteria) on the bottom of
form one which will take me to form two or form three. My problem is that
when I enter data into form two or form three, the data does not transfer
into the respective tables. Form one data dumps into its respective table
just fine. I have tried adding "requery" for the two faulty forms but this
does not help. How can I get the data from the two forms to propogate the
fields in the two tables?
 
J

John Vinson

I have a very simple database that is using three tables/three forms. All
three are linked by a field called EmployeeNumber. I have two command
buttons (macros which set the "EmployeeNumber" as criteria) on the bottom of
form one which will take me to form two or form three. My problem is that
when I enter data into form two or form three, the data does not transfer
into the respective tables. Form one data dumps into its respective table
just fine. I have tried adding "requery" for the two faulty forms but this
does not help. How can I get the data from the two forms to propogate the
fields in the two tables?

Whoa! Major misconceptions abound here.

Storing the same data in two tables (much less three) is NEVER a good
idea. Redundancy is to be avoided, thereby avoiding redundancy!

Secondly, creating a record in one table will NOT automagically create
a record in any other table, and it shouldn't. Different tables should
contain different data, and you should only enter data into a table
when there is valid data for that table.

Could you explain what these three tables contain, and what you're
trying to accomplish with them? I VERY strongly suspect that the
problem has nothing to do with your forms, but with your table design
(and perhaps your expectations of how tables and forms work).

John W. Vinson[MVP]
 
T

TAWise

I must not have explained very well. The three tables contain different data
with the exception of one field "Employee Number". What I am trying to
accomplish is: there is the first form which contains information that we
must store for all new employees. The second form (which has a command
button link on form one) leads to a form (and table) that is specifically
designed for employees who work in a lab. The third form (which has a
command button link from form one) leads to a form (and table) specifically
designed for employees who work in an office environment. When I enter the
data on form one, it is stored in Table One. But when I enter the data in
form two or three, it does not store in their respective tables. I need all
of the data stored appropriately so that I can print a report for each record.
 
J

John Vinson

I must not have explained very well. The three tables contain different data
with the exception of one field "Employee Number". What I am trying to
accomplish is: there is the first form which contains information that we
must store for all new employees. The second form (which has a command
button link on form one) leads to a form (and table) that is specifically
designed for employees who work in a lab. The third form (which has a
command button link from form one) leads to a form (and table) specifically
designed for employees who work in an office environment. When I enter the
data on form one, it is stored in Table One. But when I enter the data in
form two or three, it does not store in their respective tables. I need all
of the data stored appropriately so that I can print a report for each record.

I'm wondering if the second and third forms should perhaps be Subforms
of the mainform, with the Employee Number as the master/child link
field. It sounds like the second and third tables are in a one-to-one
relationship to the Employees table (a classic case of "subclassing").

What are the Recordsource properties of the second and third form?
Could you plst the code in your command button's click event?

John W. Vinson[MVP]
 

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