Hi All,
I have a form where I select the records to be printed in a report
Below is the code I use and as it should appear
It opens the report as hidden
Then opens the standard printer popup
Print
Close the report
but now instead of printing the report, it prints the form where I have selected the records to be printed
Please could you advise
I have a form where I select the records to be printed in a report
Below is the code I use and as it should appear
It opens the report as hidden
Then opens the standard printer popup
Close the report
but now instead of printing the report, it prints the form where I have selected the records to be printed
Please could you advise
Private Sub Print_Click()
On Error GoTo Print_Click_Err
DoCmd.SetWarnings False
DoCmd.OpenReport "DAW Sheet - Final", acViewPreview, , , acHidden
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, "DAW Sheet - Final"
DoCmd.OpenQuery "Update DAW Printed", acViewNormal, acEdit
DoCmd.OpenQuery "Update DAW Printed By", acViewNormal, acEdit
DoCmd.Requery "CS Raised - Mail Sub"
DoCmd.RunMacro "Update DAW Sheet TBL", , ""
DoCmd.Close acForm, "Menu"
DoCmd.OpenForm "Menu", acNormal, "", "", , acNormal
DoCmd.SetWarnings True
Print_Click_Exit:
Exit Sub
Print_Click_Err:
MsgBox Error$
Resume Print_Click_Exit
End Sub