This is to be an automated task, which will open the database as a scheduled task, the opening event will fire the code to create the report but I don't want the pdf report to open, silent task you see.
Code: Select all
Private Sub Form_Open(Cancel As Integer)
DoCmd.SetWarnings False
DoCmd.OpenQuery "mkJCV", acViewNormal, acEdit
DoCmd.SetWarnings True
'DoCmd.OpenReport "K2K-Summary", acPreview, "", "", acNormal
DoCmd.OutputTo acOutputReport, "K2K-Summary", acFormatPDF, "L:\mmpdf\MMDocs\Bodyshop Info\K2K-Summary" & ".pdf", True
DoCmd.RunCommand acCmdExit
End Sub