PC Review


Reply
Thread Tools Rate Thread

Changing the printer's paper bin before printing report

 
 
=?Utf-8?B?U0ZBeGVzcw==?=
Guest
Posts: n/a
 
      10th Jun 2005
-also posted in the Reports subdomain

Hello,

I have been unable to successfully change the printer's paper bin setting
before printing a report. I have tried using the Access Developer's Cookbook
example code for this, but it does not work. I pulled my printer's paper bin
mapping from the Win API, so I know I am setting the property to the correct
values. I also tested the printer by selecting the trays from the printer
dialog and everything printed out to the correct tray. The code I have been
using is shown below:

Private Sub PrintReportToUpperTray()
On Error GoTo HandleError

Dim rpt As Report

DoCmd.Echo False

DoCmd.OpenReport "MyReport", acPreview

Set rpt = Reports("MyReport")

rpt.Printer.PaperBin = acPRBNUpper

DoCmd.PrintOut acPrintAll


ExitHere:
On Error Resume Next

Set rpt = Nothing

DoCmd.Close acReport, "MyReport", acSaveNo

DoCmd.Echo True

Exit Sub
HandleError:
MsgBox Err.Description & "(" & Err.Number & ")"
Resume ExitHere
End Sub

Has anyone had any successful attempts doing this? According to the Access
Developer's Cookbook, this should work.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Printer's default paper (still no luck) =?Utf-8?B?UGFub3M=?= Microsoft VB .NET 0 9th Oct 2006 02:58 PM
Changing Printer's default paper =?Utf-8?B?UGFub3M=?= Microsoft VB .NET 3 8th Oct 2006 05:57 AM
Change printer paper bin before printing report =?Utf-8?B?U0ZBeGVzcw==?= Microsoft Access Reports 0 10th Jun 2005 12:36 AM
Changing Paper Bin with Printer Object =?Utf-8?B?U2FuZHkgUmFtc2V5?= Microsoft Access Reports 0 14th Oct 2004 09:15 PM
changing printer paper size =?Utf-8?B?YmFmaWRp?= Microsoft VB .NET 0 10th May 2004 07:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 AM.