I have
filePDF = SavedReportAsPDF("rptReflow", [TeacherID], rs!TeacherID)
the function
Code:
Function SavedReportAsPDF(ReportName As String, IDWhere As Variant, IDWhereto As Variant) As String
Dim MyPDFPath As String
Dim str1 As String
Dim str2 As String
str1 = IDWhere
str2 = IDWhereto
Debug.Print str1
MyPDFPath = "C:\PDF Files\" & ReportName & ".pdf"
DoCmd.OpenReport ReportName, acViewPreview, , " str1 = " & str2
DoCmd.OutputTo acOutputReport, "", acFormatPDF, MyPDFPath, False
DoCmd.Close acReport, ReportName
SavedReportAsPDF = MyPDFPath
End Function
I don't know how to pass the value across or what type it should be since it is a recordset clone
I'd like to have it so I can add rs!TeacherID to IDWhereto and [TeacherID] to IDWhere