I am having one button to create folder behind the Access
Private Sub Command58_Click()
filename = Ref_Number.Value
MkDir "c:\AccessDatabase\" & filename
MkDir "c:\AccessDatabase\" & filename & "\Commercial"
MkDir "c:\AccessDatabase\" & filename & "\Deployment"
MsgBox ("File has been created successfully")
Now I want a button that can save the Pdf into the folder itself based on the same Ref_Number
Dim filename As String
Dim filepath As String
filename = Me.Ref_Number
filepath = "c:\AccessDatabase\" & filename & ".pdf"
DoCmd.OutputTo acOutputReport, "OrderCustomerReport", acFormatPDF, filepath
MsgBox "Quotation has been saved successfully", vbInformation, "Save confirmed"
What code am I missing out? or What code to input?