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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding multiple names to a form

Status
Not open for further replies.

Dina01

Programmer
Mar 26, 2002
204
CA
I was wondering if anyone has ever created an db that is familiar to what I am trying to do. I have form that is unbound, and that has a few combo box, that are alllinked to different table, one of the combox give the choice to add 4 employee names to the form, because there can be up to 4 employee that have the same training.

But my combo is linked to another table called Employe_tbe which looks like this

Employee_tb:
EmployeeName
EmployeeNo --- this is the primary key
EmployeCode

But all the info form the form will be saved into another table named Traning_tb

I save the data by pressing a SAVE button on this form and then I use the additem, but since I have 5 combo box for the employees named: Empl1, Empl2,Empl3, Empl4, Empl5

My table Training_tb
Also has the following fields:

CourseName
CourseID
Date
EmployeeNo
Empl1
Empl2
Empl3
Empl4
Empl5
Code

Both table are linked with the EmployeeNo, but I am confused cause it's not saving into my table named traning_tb

And I need the table named Emplyee_tb to get updated because if I set the code to 1 that means that the employee is already in a traing course, and code 0 means he is avaialble

Tahnks



 
I would recommend creating a bound form, based upon the Training table.

The controls for the employee's should be bound to Empl1 (etc) fields in the Training table. The Empl1 (etc) fields in the table Training should be integer fields, which lookup EmployeeNo from the Employee table.

This way, you will be able to select employees from the Employee table, but their employeeNo will be recorded in the Training table...


I see no reason for having an unbound form...


James Goodman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top