Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Print dialog box available to users

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shirley - 30 Jan 2006 10:30 GMT
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?
Signature

Regards
Shirley

Allen Browne - 30 Jan 2006 11:36 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.