I created a custom toolbar in Access 2003. I want the users to see the built
in print setup dialog box so that they can choose No of copies, range etc;
but the print button just sends the report straight to the printer. Why is
this? I have even tried coding in Sendkeys (ctrl and P), but that sends the
report straight to the printer as well.
Yet when I use the Print option from the standard File pull down menu, the
dialog box displays. Can anyone advise?
After you OpenReport in preview, try:
RunCommand acCmdPrint

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I created a custom toolbar in Access 2003. I want the users to see the
>built
[quoted text clipped - 7 lines]
> Yet when I use the Print option from the standard File pull down menu, the
> dialog box displays. Can anyone advise?
Shirley - 30 Jan 2006 15:15 GMT
Thanks, that seemed to do the trick.
Now, when a report is in print preview mode, the user clicks the print
button on the custom toolbar and runs the following code:
Function fnPrint()
On Error Resume Next
Dim rptCurrentReport As Report
Set rptCurrentReport = Screen.ActiveReport
DoCmd.OpenReport rptCurrentReport.Name, acViewPreview, acViewNormal, , ,
acWindowNormal
RunCommand acCmdPrint
End Function

Signature
Regards
Shirley
> After you OpenReport in preview, try:
> RunCommand acCmdPrint
[quoted text clipped - 10 lines]
> > Yet when I use the Print option from the standard File pull down menu, the
> > dialog box displays. Can anyone advise?