MS Access query to return the most recent record from a table?
Hello Experts.
Well, apparently I lack the ability to learn from the hundreds of posts that cover this same question so I am reaching out for some guidance.
I have two tables: tbl_emp and tbl_emp_assnmt. tbl_emp contains all of our employees and tbl_emp_assnmt holds all their assignments. Each employee can have multiple assignments. I would like to pull just the most recent tbl_emp_assnmt for each employee. Here's the query that pulls everything:
I would like the most recent assignment based on the Assignment Entry Date (tbl_emp_assnmt.entry_dt) field. Once catch though, not everybody has assignments yet, and I need them to be in the results of this query also. So this query should return the most recent assignment for each employee, and just the employee (tbl_emp.emp_id_pk) if there aren't any assignments yet.
I hope this makes sense. Any help would be greatly appreciated.
Thanks Simon! Everybody gets one assignment per day, never anymore so this works great for what I need. I somebody were to get more than one I would need to see that as well.