G
Guest
I have a couple of question.
1. Does it matter if you have the same primary key in different tables, or is it better to have an autonumber as the primary key instead?
2. I have a database set up with the following tables: Employees, Wages, Resignation, Training, and Training list. Employees includes these fields (Employee ID (pk), Name, Address, Phone, Date Hired, yes/no box for separated. My training list table has one field called Trainings, which is the primary key. Should I set another field to autonumber for that? The training table has the fields (EmployeeID, Training, Date Taken, Yes/no for if it was late, Previous due date, and Date turned in. The last two fields are only used if the person didn't renew their training by their previous expiration. I have an expiration field on the Training form that calculates the expiration date depending on each training, since they all have different lengths they are good for.
My problem is trying to figure out how to run a query that will pull up who hasn't had a training. Since the Training only has the field "training", which on the form lets you select from a drop down list to choose, I cannot get a query to run and show which employee hasn't had a class. I want to be able to run a query that will show the employee name and list any classes that they don't have a date in for. Since the training field can be several different items, I'm having a heck of a time trying to figure this out and I'm sure it's simple. Is there a better way of setting this up.
I'd also like to make query that will show who has a class ready to expire in a coming amount of time.
1. Does it matter if you have the same primary key in different tables, or is it better to have an autonumber as the primary key instead?
2. I have a database set up with the following tables: Employees, Wages, Resignation, Training, and Training list. Employees includes these fields (Employee ID (pk), Name, Address, Phone, Date Hired, yes/no box for separated. My training list table has one field called Trainings, which is the primary key. Should I set another field to autonumber for that? The training table has the fields (EmployeeID, Training, Date Taken, Yes/no for if it was late, Previous due date, and Date turned in. The last two fields are only used if the person didn't renew their training by their previous expiration. I have an expiration field on the Training form that calculates the expiration date depending on each training, since they all have different lengths they are good for.
My problem is trying to figure out how to run a query that will pull up who hasn't had a training. Since the Training only has the field "training", which on the form lets you select from a drop down list to choose, I cannot get a query to run and show which employee hasn't had a class. I want to be able to run a query that will show the employee name and list any classes that they don't have a date in for. Since the training field can be several different items, I'm having a heck of a time trying to figure this out and I'm sure it's simple. Is there a better way of setting this up.
I'd also like to make query that will show who has a class ready to expire in a coming amount of time.