Hello!
The database I am creating is used to audit work completed by managers. I am trying to find the most efficient way to pull a random selection of records for each manager under a director.
I have a query that pulls in all of the records completed by the managers for that area and I have a parameter set for the director to type in their name so that it pulls in audits completed by only their managers. Is there a way to pull in a set number of randomly selected audits for each manager? Is it possible to tell it to pull only unique values from the manager column?
This is what I have so far....
Code:
SELECT tblAutoAudits.AuditName, tblAutoAudits.Unit, tblAutoAudits.Manager, tblAutoAudits.UserName, tblAutoAudits.[Claim Number], tblAutoAudits.LossDate, tblAutoAudits.[Date Audit Pulled], tblAutoAudits.[Loss Description], tblAutoAudits.COL, tblAutoAudits.Auditor, tblAutoAudits.DateAudited, tblAutoAudits.Coverage, tblAutoAudits.[Investigation/ Liability], tblAutoAudits.Financials, tblAutoAudits.APD, tblAutoAudits.[Injury Evaluation & Settlement], tblAutoAudits.[Documentation/ File Coding], tblAutoAudits.[Communication & Customer Service], tblAutoAudits.[Audit Comments], tblAutoAudits.[Positive Feedback], tblAutoAudits.[Opportunity for Improvement], tblAutoAudits.[Overall Score], tblAutoAudits.[Skip Reason], tblAutoAudits.Area, tbl_Directors.[Director Name], Rnd([Overall Score]) AS Random
FROM tblAutoAudits INNER JOIN tbl_Directors ON tblAutoAudits.Area = tbl_Directors.Area
WHERE (((tblAutoAudits.[Overall Score]) Is Not Null) AND ((tbl_Directors.[Director Name])=[Enter Director name for audits to complete - (example: Smith, John)]));
Thank you for any ideas or help you can provide!