Your technology certification is waiting. Enroll in Cloud Class ®
sD = Form_frmMain.txtStartDate
eD = Form_frmMain.txtEndDate
rNow = Format(Date, "yyyymmdd")
tDate = rNow & "_" & Format(sD, "yyyymmdd") & "_" & Format(eD, "yyyymmdd") & "_"
For Each sPD In Me.lstEnrollments.ItemsSelected
strSPD = Me.lstEnrollments.ItemData(sPD)
Me.txtWorkingRecord2 = strSPD
RecCount = RecCount + 1
Me.txtCounter2 = RecCount
stDocName = "rptEnrollmentsWithoutDetails"
FileName = "EnrollmentsWithoutDetails_" & strSPD
XFile = FileDir & tDate & FileName & " .pdf"
'DoCmd.OpenReport "rptEnrollmentsWithoutDetails", acViewPreview
DoCmd.OutputTo acOutputReport, "rptEnrollmentsWithoutDetails", acFormatPDF, XFile, False
'DoCmd.Close acReport, "rptEnrollmentsWithoutDetails", acSaveNo
Open in new window
DoCmd.OutputTo acOutputReport, "Invoice", _
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.