Print Problems

indesisiv

Access - What's that?
Local time
Today, 22:32
Joined
Jun 13, 2002
Messages
265
Hi all,
Sorry if this has been posted elsewhere but i can't seem to find a solution.

The problem:
I have a report that prints exactly onto 2 pages (designed as a booklet) this prints fine on my computer and also many others. However on a few computers it prints blank pages inbetween. I know this is due to the margins BUT
Is there a way to get it to automatically resize it so that it fits the printer margins and still print on just 2 pages with no blank ones inbetween.

Thanks in advance
Steve
 
You could use SendKeys to send the appropriate keystroks to set the printer margins immediately prior to opending the reports.

The Access Cookbook, published by O'Reilly has the numerous code examples for controlling a printer.
 
You could use SendKeys to send the appropriate keystrokes for changing the report margins immediately prior to opening the report.

The Access cookbook, published by O'Reilly, has various examples of printer control for A2k and above.
 
I'll see if i can get it to work in the 2000 version however i also need to do it in the 97 version. Most of our users are still miles out of date.
 
Ok so I can't get this to work.

Does any one know if there is a way to do this through code ie in the report format section.

I have loads of other formats in the code but i just can't get it to set the page margins.

Is it possible or will I have to carry on fighting with the sendkeys route.
And one further thing if i use the send keys then do i have to open the report in preview mode first then use the sendkeys to set margins and then print and close?

Thanks for any help
This is really bugging me now:mad: .

Steve
 
Try

dim strreport as string
strreport = "Some Report Name"
docmd.reports(strreport),View:=acViewPreview
with Reports(strReport).printer
'inches to ratser conversion is required
.leftmargin= 1 * 1440 ' inches to rasters
.rightmargin = .25 * 1440 'inches to rasters
.topmargin = .75 * 1440 'inches to rasters
.bottommargin = .5 * 1440 'inches to rasters
end with

It will work with A2002 or later, but not earlier. For the latter, serious code is involved.
 
Thanks for that ... i'll give it a go.

Steve
 

Users who are viewing this thread

Back
Top Bottom