hiiii all dears
i have code to save my report to pdf ,
my report contains a field "OrderDate" , i need to save reports of every year in seperated folder inside the Main Folder (MyPath) by the number of the year and inside every Year folder months folders that contains day folders like: 2015 -- January 2015 -- 01 January 2015 -- inside it PDF Files of this day.
i have this code:
what is the best way to save my reports inside that folders for every day.
i have code to save my report to pdf ,
my report contains a field "OrderDate" , i need to save reports of every year in seperated folder inside the Main Folder (MyPath) by the number of the year and inside every Year folder months folders that contains day folders like: 2015 -- January 2015 -- 01 January 2015 -- inside it PDF Files of this day.
i have this code:
Code:
Dim myPath As String
Dim myFileN As String
myPath = "C:\Users\QSH\Desktop\ultrasonography\"
myFileN = Me.PtName & " - " & Format(Me.OrderDate, "dddd , dd mmmm yyyy") & ".pdf"
DoCmd.OpenReport "MainRpt", acViewPreview, , "OrderID = " & OrderID, acHidden
DoCmd.OutputTo acOutputReport, "MainRpt", acFormatPDF, myPath & myFileN, True
DoCmd.RunMacro "RptClose"
what is the best way to save my reports inside that folders for every day.