I have changed the buttons with this procedure:
Private Sub Command19_Click()
Dim stDocName As String
stDocName = "Report Name"
DoCmd.OpenReport stDocName, acPreview, , "[RecordID] = " & Me.RecordID
DoCmd.SendObject acSendReport, "Report Name", acFormatPDF, , , , , False...