Solved

Force to print report on single side in access

Posted on 2010-08-18
7
670 Views
Last Modified: 2013-11-28

I have a form command button to print a report and even thought the printer seting is single side print it still print duplex when clicking the button. The command is as below.

DoCmd.OpenReport "reportname", acViewNormal

I dont see anywhere why it should print doeble sided, Is there a code to force it as single sided?
0
Comment
Question by:tvae
  • 3
  • 3
7 Comments
 
LVL 84
ID: 33465818
Duplex is a function of the printer, not Access, While you may be able to control that from code, it can be difficult to do.

What version of Access are you using? Access 2002+ exposes the Printer object, which you may be able to use:

http://msdn.microsoft.com/en-us/library/aa139946(office.10).aspx
0
 

Author Comment

by:tvae
ID: 33465927
Yes using access 2002. The printer is set to single but dont know why it's printing double sided
0
 

Author Comment

by:tvae
ID: 33466343
I have added this rule but still print duplex.

    Dim rpt As Report
    Dim prtnew As Printer
    DoCmd.OpenReport ReportName:="rptPickListALLPONumber", View:=acViewNormal
    'stDocName = "rptPickListALLPONumber"
    Set rpt = Reports!rptPickListALLPONumber
    Set prtnew = rpt.Printer
    prtnew.Duplex = acPRDPSimplex
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 33466712
Another Long shot...

1. Open the Report in design View
2. Make a small change to the design of the report (move a control a little)
3. Go into Page Setup and manually change the printer properties to print Single sided.
4. Save the Report.
5. Run the Compact and Repair Utility
6. Test the report.

The theory behind this is, by changing the report slightly, then saving the report that this will "Force" the printer settings to be saved with the report.

This worked for a prior question, I guess it is worth a shot here.

Like LSM, I have seen the code to do this, but he can probably dig it up for 2002 access db files...

;-)

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33466725
^ oh and if you ty this, use the simple code to open the report:
    DoCmd.OpenReport "reportname", acViewNormal
0
 

Author Closing Comment

by:tvae
ID: 33467107
omg..that was it.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33467685
;-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now