Export report in Desktop with account name

theinviter

Registered User.
Local time
Today, 07:37
Joined
Aug 14, 2014
Messages
273
Dears teams;
Hi,

I would like to seek your help, i Have a report and want saved it with current date as month and year and account name.
as i want to create a button, once the use clicks it then it will create a folder on Desktop Named " Evaluation report" and save the file as PDF inside this folder in desktop.

as tried below but not succeful;

Private Sub Command229_Click()
Dim MyFileName As String

MyFileName = Me.Account_Name


DoCmd.OutputTo acOutputReport, "Clinics_Report", acFormatPDF, "C:\Users\Default\Desktop & MyFileName.PDF"

End Sub
 
Maybe you meant?

... & MyFileName & ".pdf"
 

Users who are viewing this thread

Back
Top Bottom