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

Adding New Table with Relationships

Status
Not open for further replies.

lmarles

Technical User
Dec 8, 2000
25
CA
I have an EMPLOYEE table. I want to create a new table, ABSENT2000, to record days absent in the year 2000. The ABSENT2000 table will have fields for each month of the year and a 'total' field.

I will create a form for entering data into the ABSENT2000 table. I want to be able to key off of the Employee's LAST_NAME (a field in the EMPLOYEE table) when entering data on the form.

Do I need a field for LAST_NAME in the ABSENT2000 table?

Do I need to/how do I populate the new table with records for each emloyee? How do I set the table up so that when I add or delete an employee record from the EMPLOYEE table the ABSENT2000 table is automatically updated to do the same add or delete?

Lou Marles
 
Did you create an employee number or some other index in the employee table? That would be one you would use. Don't use the employee name as an index.

Assuming you do have an employee ID number of some sort...

In your Absent2000, have a field for the employee ID from your employee table.

Create in your form a lookup field associated with the employee table to populate the employee ID field in your Absent2000 table.

All you need is the absent2000 table. No need to create table for each employee.

Instead of deleting the employee, maybe have some kind of flag that the employee is no longer with the company.

Just some thoughts..

Mary :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top