I have this code to save a report to file:
Private Sub Command17_Click()
Me.Refresh
On Error GoTo Err_Command17_Click
Dim stDocName As String
stDocName = "rptOperator Log"
DoCmd.OutputTo acReport, stDocName, acFormatPDF, "L:\Operations\Team Managers\" & DatePart("yyyy", Date_of_Log) & " Operator Log\" & Employee_Name & ID & ".pdf"
Exit_Command17_Click:
Exit Sub
Err_Command17_Click:
MsgBox Err.Descriptionq
Resume Exit_Command17_Click
End Sub
The problem I'm having is that everytime it saves,it saves one file with all the records to pdf not just the current one and it also prints at the same time. all i want is to save the current report displayed on the form with the employee name and file ID on pdf. any help with this matter will be appreciated.
thanks in advance.