By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,134 Members | 678 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,134 IT Pros & Developers. It's quick & easy.

Return most recent date for multiple records

P: 10
I manage a training database where I work and I would like to run a make table query. The table I want to query has a list of trainings our employees have taken and the dates they have taken the trainings. The table only lists the employee number and it is related to a table which includes the employees' names and the employees' numbers. I would like my query to look at each employee and find all the records where they have taken, for example, 'Fire Safety' (this is a training required yearly so each employee will have taken it many times). I want it to then return only the most recent date they have had that training. I want it to do this for each employee in the database who has had 'Fire Safety' and I want to make a table from the results. Is there anyway to do this? Thanks in advance for any assistance.
Oct 24 '06 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 14,534
In Access open a query in design view. Change the query type to make table query and then go to sql view. Paste in the following but change the field and table names accordingly.

SELECT tblEmployees.EmployeeID, EmployeeName, CourseName, Max([CourseDate]) FROM tblEmployees INNER JOIN tblTraining ON tblEmployees.EmployeeID=tblTraining.EmployeeID WHERE CourseName='FireSafety';
Oct 25 '06 #2

P: 10
Thanks for the help! I appreciated it and I'm off on the right track.
Oct 25 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.