I have an Access report that I would like to loop through and print filtering by the Supervisor Name.
I tried the following code, but the report is blank.
the strSupv does match the Supervisor field on the report.
Any advice would be appreciated.
Public Function PrintReports()
Dim strSupv As String
Dim rsSUPV As New ADODB.Recordset
rsSUPV.ActiveConnection = CurrentProject.Connection
Do While Not rsSUPV.EOF
strSupv = rsSUPV("SupName")
DoCmd.OpenReport "rptEmployeeWorkList", acViewPreview, , "[Supervisor] = 'strSupv'"