Public Sub Supervisor() Dim MyRs As DAO.Recordset Dim rpt As Report Set MyRs = CurrentDb.OpenRecordset("qry_Active_Employee_Supv") DoCmd.OpenReport "rpt_Active_Employees_By_Department", acPreview, , , acHidden Set rpt = Reports("rpt_Active_Employees_By_Department") With MyRs .MoveFirst Do While Not .EOF ' open report hideen and filtered ' save the hidden report as a PDF rpt.Filter = "[Supervisor] = " & Chr(34) & !Supervisor & Chr(34) rpt.FilterOn = True DoCmd.OutputTo acOutputReport, "rpt_Active_Employees_By_Department", acFormatPDF, "\\pmcfs\groups\HR\HR Extractions\ActiveEmployees\Active_Empl_List_" & !Supervisor & ".PDF" .MoveNext Loop End With rpt.Filter = " " rpt.FilterOn = False End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE