C
chopper7898 via AccessMonster.com
I'm using 2007 and I have the PDF download from MS and it works.
My old database I used the code below to save as Snapshot and it worked great.
I would like to do the same but as PDF.
Can I modify the code to do that?
The code below will send the report to the designated folder and adds
information from the report for the file name.
It works really great in Snapshot, but now at work it's PDF they want.
Private Sub cmdSaveReport_Click()
Dim strReportName As String
Dim strcriteria As String
If NewRecord Then
MsgBox "This record contains no data. Please select a record to print or Save
this record.", vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "Daily Report"
strcriteria = "[AutoNo]= " & Me![AutoNo]
DoCmd.OpenReport strReportName, acViewPreview, , strcriteria
If MsgBox("Do you want to save the report to My Document\Akima\Daily Reports?
", vbYesNo + vbQuestion, "Save Report") = vbYes Then
strOutputName = "C:Akima\Daily Reports\Site" & " " & (Me.Site) & " CQC" & "
DR-" & (Me.ReportNo) & " " & (Me.Shift) & " " & _ Format(Me.Date, "mm-dd-yy")
& " " & (Me.DateDay) & ".snp"
DoCmd.OutputTo acOutputReport, strReportName, acFormatSNP, strOutputName,
True
End If
End If
End Sub
My old database I used the code below to save as Snapshot and it worked great.
I would like to do the same but as PDF.
Can I modify the code to do that?
The code below will send the report to the designated folder and adds
information from the report for the file name.
It works really great in Snapshot, but now at work it's PDF they want.
Private Sub cmdSaveReport_Click()
Dim strReportName As String
Dim strcriteria As String
If NewRecord Then
MsgBox "This record contains no data. Please select a record to print or Save
this record.", vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "Daily Report"
strcriteria = "[AutoNo]= " & Me![AutoNo]
DoCmd.OpenReport strReportName, acViewPreview, , strcriteria
If MsgBox("Do you want to save the report to My Document\Akima\Daily Reports?
", vbYesNo + vbQuestion, "Save Report") = vbYes Then
strOutputName = "C:Akima\Daily Reports\Site" & " " & (Me.Site) & " CQC" & "
DR-" & (Me.ReportNo) & " " & (Me.Shift) & " " & _ Format(Me.Date, "mm-dd-yy")
& " " & (Me.DateDay) & ".snp"
DoCmd.OutputTo acOutputReport, strReportName, acFormatSNP, strOutputName,
True
End If
End If
End Sub