Here is my table of companies and employees with thier title ranks, I need to select just the highest ranking empl for each company.
My problem is how do I get the top ranking EmpID for each company? Like this:
The query I used to get the ranking is this:
Everything I tried returns all the records because of the grouping, each record is unique., and if I take out what makes it unique then I loose my empID. What am I doing wrong, this should not be so difficult for me, but it is. 
Code:
Comp
anyID Rank EmpID
=====================
100 1 104
100 2 103
100 3 101
100 4 102
200 1 202
300 2 301
300 4 302
400 2 402
400 3 401
Code:
Comp
anyID Rank EmpID
=====================
100 1 104
200 1 202
300 2 301
400 2 402
Code:
SELECT tblMailList.CompanyID, Max(IIf([TitleID]=460,4,IIf([TitleID]=360,3,IIf([TitleID]=390,2,1)))) AS Rank, tblMailList.EmpID
FROM tblMailList
WHERE (((tblMailList.TitleID)=460 Or (tblMailList.TitleID)=360 Or (tblMailList.TitleID)=390 Or (tblMailList.TitleID)=520))
GROUP BY tblMailList.CompanyID, tblMailList.EmpID
ORDER BY tblMailList.CompanyID, Max(IIf([TitleID]=460,4,IIf([TitleID]=360,3,IIf([TitleID]=390,2,1))));