Hello All,
I have created a command button on my form to create a report and save this as a PDF, which works perfectly using the code below:
However this exports all of the records in this table to the .PDF file. I am hoping to just export the record which the form is filtered to.
Is anybody aware of how this could be solved?
Thanks all
I have created a command button on my form to create a report and save this as a PDF, which works perfectly using the code below:
Code:
Dim FolderPath As String, FileName As String
'Exports report as PDF to Folder Path with Code Number as the file name
FolderPath = "G:\Medical Engineering\Medipro\Scrap Notification Letters\"
FileName = FolderPath & Me.[Code No] & ".pdf"
DoCmd.OutputTo acReport, "ReportScrapNotification", acFormatPDF, FileName, False
However this exports all of the records in this table to the .PDF file. I am hoping to just export the record which the form is filtered to.
Is anybody aware of how this could be solved?
Thanks all