Well I have a table for each department of my industry and the same employees
work in each department during different times of the year. Therefore I would
like to be able to keep the tables different so I can create forms with a
control source of each department.
If you're assuming that you must have a separate table to have a
different control source, your assumption is WRONG. So is your table
design.
You can have a Departement field in the single table, and use a Query
selecting one department to display that department's employees.
This allows the employees to insert information with the department and date
already added to the form. Saves them from adding this information and it
doesn't get added incorrectly. I have a conituos form for each department
with the department name on top and the date already added. But I need a
combo box in each of these forms that will update the " Name" field in all of
the tables
Storing the name redundantly is simply incorrect design.
If you have a many to many relationship between employees and
departments, you need (at least) three tables:
Departments
DepartmentID
DepartmentName
<other info about the department>
Employees
EmployeeID
LastName
FirstName
<other bio data>
EmployeeAssignments
EmployeeID <who's assigned>
DepartmentID <where they're working>
StartDate
EndDate
Position
<other info about this employee in this department>
You can still have a Form based on Departments, with the department
name; it can be filtered so only one department can be shown. On the
Subform (based on EmployeeAssignments) you would have a combo box
allowing the employee name to be selected.
The end result is that you get what you asked for - the name
associated with each department; a history of all the employee
assignments; no need to correct the spelling of the name in all the
different departments, or to change it if the person's name changes; a
smaller and more efficient database; and no need for code to store
your data redundantly. Would you like some other arguments for
properly normalizing your data?
John W. Vinson[MVP]