I have an Employee database, that tracks Employee information and training. I have a form set up, that captures all the Employee Information, with the Employee No being the primary key. In this form, I have a subform, that lists all the training for that Employee (rows of training can be added). This subform information is housed in a MasterMatrix, which includes the Employee No (parent/child link), and the training class, and status of the training.
What I need to do is, create a button in the form that when a new employee is added to the database, it will take the Employee No from the record, and add that and 4 training classes (which are standard classes for new employees), and add them to the MatrixMaster.
I know how to do the SQL statement by just adding taking info from 1 table to the other, but how do I get it from 2 tables? I know that I need a JOIN, but I'm not sure what type I need.
Any help would be great.
1st table - tblEmployee (need EmployeeNo from here) - This is also main form
2nd table - tblTrainingClass (need Training Class, Training Status, WHERE NewEmployeeTraining = yes)
3rd table - tblTrainingMatrixMaster (where info is going to - this is also a subform, with parent/child link to EmployeeNo): - EmployeeNo, Training Class, Training Status