UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Automatically Copying Primary Key Into An Other Table, Access 2016    
 
   
manansafdar
post Feb 15 2020, 12:09 PM
Post#1



Posts: 14
Joined: 28-July 19



Hi!

Greetings,

I have a Database for HR Management, I have a "tblEmployees" with PK "EmployeeID".
Another table named "tbluSchools" has list of schools in which these employee work with PK "SchoolID".
I have a junction table named "tblschoolEmployees" in which "EmployeeID" is linked with "SchoolID".

I want that when I add an employee in tblEmployees it automatically get added into tblSchoolEmployees as well as I want to add the schoolID for this employee.

Any support will be much appreciated.

I have attached here the Database for reference.
[attachment=93169:HR_Management_V19.zip]
Thanks,

Go to the top of the page
 
 
Start new topic
Replies
GroverParkGeorge
post Feb 15 2020, 12:34 PM
Post#2


UA Admin
Posts: 37,507
Joined: 20-June 02
From: Newcastle, WA


Welcome to UtterAccess.

"when I add an employee in tblEmployees it automatically get added into tblSchoolEmployees as well as I want to add the schoolID for this employee."

If this is automatic, how do you plan to identify the correct SchoolID? I assume that this junction table was set up so that you can assign each employee to one or more schools and that each school can have one or more employees (that's the purpose of a junction table). So if it is possible to assign an employee to one or more schools, how would this "automatic" assignment happen?

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    11th July 2020 - 01:34 PM