Hey,
I have a problem - I want to create a report for every customer id.
I have a Form which contains a List field - that reports me every ID for my representative.
I need a button which use my list field and loop this into my report to pdf but I don't know how to build a loop for this.
gepa is the customer ID in this case and Vertretung the representative.
hope someone understand it ^^
thanks
I have a problem - I want to create a report for every customer id.
I have a Form which contains a List field - that reports me every ID for my representative.
I need a button which use my list field and loop this into my report to pdf but I don't know how to build a loop for this.
Code:
Private Sub Befehl210_Click()
strReportName = "2022_PS_EN_Ohne_Abfrage"
strCriteria = "[Vertretung]='" & Me![Vertretung] & "' AND [gepa]='" & Me![gepa] & "' "
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria, acHidden
myPDF = "C:\Fettzuschlag\" & Land & "_" & gepa & "_" & Name_1 & ".PDF"
DoCmd.OutputTo objectType:=acOutputReport, objectName:="2022_PS_EN_Ohne_Abfrage", outputformat:=acFormatPDF, outputfile:=myPDF, outputquality:=acExportQualityPrint
End Sub
gepa is the customer ID in this case and Vertretung the representative.
hope someone understand it ^^
thanks