Link to home
Start Free TrialLog in
Avatar of Dalexan
DalexanFlag for Afghanistan

asked on

Display full report but only print page 1 & 2

Access report with multiple subreports, displays about 15 pages of data. Customers usually print the first 2 pages and the other 13 pages are thrown away. My customers do not want the report changed, they like to see the information displayed on screen but are printing out the whole report.(instead of using the print dialog and selecting page 1 to 2)

To save paper I want to only print out page 1 & page 2 when the user prints the report. Is there a way to control this via a vba onprint statement? Please post the code?
SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You might want to consider supplying a custom button to do that.  That will give the user what they want usually but still retain the possibility to print the complete report should it be required occasionally.
Avatar of Dalexan

ASKER

How can I capture the print command instead of creating a button.

Public Sub PrintReport()
On Error GoTo Err_PrintReport

    DoCmd.OpenReport "REPORT: Site / Campaign / VoterInfo", acViewPreview
    DoCmd.PrintOut acPages, 1, 2

Exit_PrintReport:
    Exit Sub

Err_PrintReport:
    MsgBox Err.Number & " (" & Err.Description & ") in procedure PrintReport"
    Resume Exit_PrintReport

End Sub
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dalexan

ASKER

Thanks, this is good advice Nick. We're working on abandoning all microsoft tech within the next year so I'm abandoning this idea to intercept the print command.
May I ask why you are abandoning MS and what you hope to move to?
Avatar of Dalexan

ASKER

The litany of microsoft versions has me lost in a giant list of what system supports what version. We're already developing using rails and moving our reporting tools to an in house built MVC/ruby framework. Much easier to support without all the MS bullshit.
I don't have much faith in anyone right now.  Firefox and their rapid rev'ving makes them an unsuitable platform--but everyone seems to have caught that disease.  Very few have understood that the slow decline of XP and old verisons of IE indicate that a VERY large group of folks want a platform that remains stable and unchanging for a decade or more.  Rapid change is not a bonus in a mature product.  And the Cloud is not a intelligent option for most because of the stupidly high cost of high-speed upload capability.  'Let's back everything up to the Cloud!'  'Great, you try and push a terabyte up to the Cloud, and tell me how long that'll take, and if and when you get it up there, tell me how long it'll take to suck it back down in a DR situation'

Sigh.

Maybe I am an old dinosaur.
>>And the Cloud is not a intelligent option...
Unless the stuff stored there is well encrypted it is not something to trust with confidential information either.

To be honest I suspect lots of people in the software organisations would prefer a slower cycle, but the marketing people need a new product to justify their existence.

ps.  Dinosaurs were around for 150 million years, they were doing something right.
Avatar of Dalexan

ASKER

Are you also abandoning MS technology's?
No...
But the removal of Exchange from the SBS replacements (WIndows Server Essentials) means that things have gotten very pricey and complex (the cheapest solution for 25+ users licensing-wise is to install Windows Server as a hypervisor, and then Windows Server twice as a VM, once as a domain controller and Essentials Experience unit, and once to run Exchange.)  And then you need all the bloody CALs, both Server and Exchange.  Much more expensive.
And...
MS has SharePoint-itis.  I am an Access guy.  There's no need to manage thousands of Word and Excel documents.  That's what Access reports are for :)  MS has left the VBA platform twisting in the wind, in favor of this 'Look ma, no code (only intermediate functionality, but no code!) thing.  They should know from the complete thud that Surface RT devices landed with that the VBA platform is the very thing that continues to drive Office (remember what occurred with that Office for Mac version that had no VBA support?)  But they sure don't talk or act like they know it.

It'll be a lot like the moderate Republican experience -- I didn't leave them, they left me.
Avatar of Dalexan

ASKER

It'll be a lot like the moderate Republican experience -- I didn't leave them, they left me.
I like it, haha! My girlfriend happens to be a systems analyst for a major government contractor, they use MOSS, she has nothing but bad things to say about it.
Nobody has good things to say about SharePoint except MS.
For them, 'It's a growing billion dollar division!'
But for most folks who are in that hell, this site isn't full of jokes
http://paulswider.com/sharepoint-jokes/
It's full of bitter observations of their everyday reality