Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Update Table?

Status
Not open for further replies.

needadvice

Programmer
Apr 7, 2002
145
US
I have a table called AssignmentTbl that has three fields : Skill,EmpFname,EmpLname. I need to populate all three fields at once from another table (employeeTbl)which has the indentical fields. I tried making the Skill field a ComboBox but that only worked for that field. Is there any way to do all three at once?
Please Help.
 
needadvice

If you are transferring data from table to another, I suggest you use an append query instead of a form.

In your database window, click on the Query tab. Create a new query in design view. Add the originating table. Double click on each field to be copied. Click on the menu item "Query" and select "Append". You will be prompted for the destination table - select the appropriate one. If your fields are identical, then the system will automatically populate the destination fields. If not, you will have to do this task manually by selecting the appropriate field in the row "Append to". Run the query by clicking on the "!" (bang or esclamation mark). The system will advise you that you are about to "append "xxx" number of rows. Click Yes and you are done.

Richard
 
And from a design stand point, wouldn't you be better off storing the SKILLID with the EMPID instead of the employee's name? What happens when another Bob Smith joins the company?

Also, if you have the identical fields in tblEmployee, why would you want to store duplicate data?

I would expect a normalized database tracking employees, their skills and their assignments to be set up as follows (ps - this is almost the same project I had for my Senior project in school!!):

tblEmployees
EmpID PK (can use SSN)
FName
LName
etc.


tblSkills
SkillID PK
SkillDescription


tblEmployeeSkills
EmpID (FK, PK)
SkillID (FK, PK)

tblProject
ProjectID PK
ProjectName

tblProjectSkills
ProjectID (FK, PK)
SkillID (FK, PK)
AssignedEmpID (FK)

HTH

For more information on normalized databases check out 'The Fundamentals of Relational Database Design'

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top