How can I write info to TWO tables at once?

H

HMJessen

We have a DB where two of the tables HAVE to have the employees ID entered.
Table1 is where the personnel information is kept (Name, DOB, Address, etc.)
and Table2 is where the equipment that is issued to this person is kept.

When a new employee is hired, the main DB has a button (new employee) which
opens a small form asking for the name, team assignment and employee ID.
This infor is written to Table1, and the employee needs to be written to
Table2 also.

So far, i have not been able to get this to work.

Can anyone offer some assistance, please?

Thank You.
 
J

Jeff Boyce

Why? As in "why do you have to have an ?empty? record in table2 before any
equipment is issued?"

A common way to handle what appears to be a one-to-many relationship (one
employee can have many pieces of equipment) is to use a main form that shows
employee info and a subform that shows issued-equipment. When you use the
Parent/Child linking field properties of the subform control, Access handles
creating a new record in the issued-equipment table, but ONLY when you add a
piece of equipment!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Top