same record two tables

G

Guest

If this thread has posted twice I apologize. As bestI can tell it did not
post yesterday.

I have two tables tblEmpData and tblPayrate. In both tables the EmpNum field
is the primary key. I have had to split this data due to confidentiality
concerns but I need to link to the tblEmpData from other databases. My
problem is when I add a new employee specifically a new employee number I
need that entry to create a new record in both tables tblEmpNum and
tblPayrate. Currently I do this with a dialog box that will populate EmpNum
in the tblPayrate table and upon exit of this dialog box via a macro will
open the frmNewEmpData which populates the record in the tblEmpData.

It seems like there must be a better way.
 
G

Guest

Create a form from tblEmpData and a subform for tblPayrate use the wizard. If
you create a new record in the EmpData form and also put some data in the
Payrate subform, Access will populate the tblPayrate EmpNum field.

If you haven't already thought of it, you may want to open up the
Relationship window and create a join between these two tables. As it will be
from PK to PK, it should automatically become a 1-1 relationship. Turn on
Referiential Integrity too. I'm not a big fan of Cascade Delete but Cascade
Update is OK.
 
G

Guest

Great, I new there was an easier way. I was just having a mental block.
trying to make it harder than was necessary. Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top