how to store data in tow tables

G

Guest

I have a form to register new employee
In this form there are the following data:
Employee name.
ID
Supervisor name.
Job ladder.
Required tasks.
This information will be stored in table called "employee table"
I have another table called requirement table contains the following
Job ladder
Requirement name.
Code
There are about 15 job ladder, each job ladder has about 14 requirements.
What I want to do is store the job ladder requirements in table called"
employee requirements with the following fields
Employee Id
Job ladder
Requirement name
Status (check box for requirement status either taken nor not)
When the employee registered from the new employee form, the data store
twice in employee table and employee requirements
Can any body help
 
J

John W. Vinson

I have a form to register new employee
In this form there are the following data:
Employee name.
ID
Supervisor name.
Job ladder.
Required tasks.
This information will be stored in table called "employee table"

That's not a properly normalized design.

If each Employee can be assigned one *or more* tasks, then you need at least
THREE tables, not just the Employee table. I'd suggest adding a table of Tasks
(with a list of all of the tasks which any employee might be assigned), and a
table of Assignments with fields for the employee ID and the task ID.

You can put a Subform on the Employee form based on Assignments, with a Combo
Box based on Tasks on the subform to select the tasks.
I have another table called requirement table contains the following
Job ladder
Requirement name.
Code
There are about 15 job ladder, each job ladder has about 14 requirements.
What I want to do is store the job ladder requirements in table called"
employee requirements with the following fields
Employee Id
Job ladder
Requirement name
Status (check box for requirement status either taken nor not)

Same logic; just a second subform on the Employee form. I'm not sure what you
mean by "job ladder" but I'm pretty certain that the field should exist in
either the Employee table, or the EmployeeRequirements table - but *not* in
both.
When the employee registered from the new employee form, the data store
twice in employee table and employee requirements

You would store the employee information ONCE AND ONCE ONLY; it is not
necessary to store it anyplace else.

Don't make the common mistake of thinking that Forms are primary, or that you
store data in Forms. You don't! Forms are *just windows*, tools to manage data
which is stored in Tables. You can store an employee's information once in the
Employees table (using a Form to do so), and then bring it up for editing or
display in that form or another form, at any time.

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