Find most recent assignment for each employee

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

This is buried in the thread named "Select Date of Last Visit" but I am
afraid it will not be seen there. If you respond there, there is no need to
repeat yourself in this thread...


I have a list of assignments made to employees. I would like
to see when the last assignment was given to each employee so I will know
who should get the next ones to come through. My table contains (among
others) UserID and DateAssigned. I used the example below to build the
query...

SELECT UserID, max(DateAssigned)
FROM tblAssignments;

I get the error:

"You tried to exceute a query that does not include the specified expression
'UserID' as part of an aggregate function."

Any suggestions?

One step further, I may need to modify this to see when the last assignment
was iven to each supervisor. I think I will be able to figure that out from
any response, but the employee UserID and their SupervisroID live in a
separate table.

Thanks!!!


Rick
 
I think we were trying to do the same thing...I found my answer at http://www.mvps.org/access/queries/qry0020.ht
Using the first example, Cascading Queries, worked for me. When the pop up boxes appeared, I just entered through them. Good Luck

----- Brian Camire wrote: ----

Try

SELECT UserID, max(DateAssigned
FROM tblAssignment
GROUP BY UserI
 
Back
Top