1

Please understand this is not my field. I have inherited an access database from a previous employee. I have a database which logs training so I have 1 table with employees names trade etc. I then have a table with all the training each person has had. What I need to do is search to find the names of employees who have not had a specific type of training logged in the second table. I would like to enter the training description and then it return a list of employee names who have not had this training.

Can anyone help please Thanks Regards Derek

0

It is helpful if you post the table design, or at least what you will be joining on. I created a sample that has 2 tables:

1) Student - Name (PK)

2) Training - Id (PK, Autonumber), Name, Class, Date

Create a relationship between Student.Name, Training.Name, enforce referential integrity.

There is a nice "Find Unmatched Records" query wizard in access that will get you going... I used it as a base and came up with:

SELECT Student.Name
FROM Student 
  LEFT JOIN Training ON Student.[Name] = Training.[Name]
WHERE (((Training.Name) Is Null));

From here you can add additional logic in your where clause to whittle it down.

Edit : I missed the part about a specific class - this is probably closer to what you are after:

SELECT Student.Name
FROM Student 
where name not in (select name from training where class='your class here')
| improve this answer | |
  • Thanks for your help, it worked "sort of" it shows the ones with a specific type of training so I suppose by definition anyone not on the list does not have it. I think we can work with this. Cheers – Wright4d Jun 10 '16 at 7:22
  • Apologies, I missed the specific class part. I updated my answer to what you originally asked. – John Hennesey Jun 14 '16 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.