access2010
Registered User.
- Local time
- Today, 12:26
- Joined
- Dec 26, 2009
- Messages
- 1,021
Until now, we have been manually choosing the path to save each Pdf report that we make within Access 2003.
Could I place a code onto our report forms or into our reports that would save the report name with the day of the year?
The day of the year code that we use in our reports is
ht(Year(Date()),2) & "=" & DatePart("y",Date())
The path is; C:\AccountingPdfs
Using a print type button on the form I would like to pragmatically print a report and then save the Pdf reports as an example to;
C:\AccountingPdfs\Customer_QuotationR_21=151.PDF
=== the current code that have been using is below
===
Your suggestions will be appreciated.
Thank you
Nicole
Could I place a code onto our report forms or into our reports that would save the report name with the day of the year?
The day of the year code that we use in our reports is
ht(Year(Date()),2) & "=" & DatePart("y",Date())
The path is; C:\AccountingPdfs
Using a print type button on the form I would like to pragmatically print a report and then save the Pdf reports as an example to;
C:\AccountingPdfs\Customer_QuotationR_21=151.PDF
=== the current code that have been using is below
Code:
Private Sub cmdSalesConfirmationPDF_Click()
On Error GoTo Err_cmdConf_Click
Dim stDocName As String
Dim stWhere As String
If Not CheckIfNotEmpty Then
GoTo Exit_cmdConf_Click
End If
Me.Refresh
stWhere = "[DocumentCounter]=" & Me.DocumentCounter
stDocName = "c_Customer_QuotationR_PDF"
DoCmd.OpenReport stDocName, acPreview, , stWhere
[Reports](stDocName).Caption = "Confirm_Q" & Me.DocumentCounter
DoCmd.OpenReport stDocName, acNormal, , stWhere
DoCmd.Close acReport, stDocName, acSaveNo
Exit_cmdConf_Click:
Exit Sub
Err_cmdConf_Click:
MsgBox Err.Description
Resume Exit_cmdConf_Click
End Sub
===
Your suggestions will be appreciated.
Thank you
Nicole
Last edited by a moderator: