Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2007, 10:30 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default Print preview

I am trying to make it so that a print preview pops up prior to the actual report is printed I am sure there is a simple way to accomplish this.

Right now I have a button that simply prints it:

Private Sub cmdPrintQuote1_Click()
On Error GoTo Err_cmdPrintQuote1_Click

    Dim stDocName As String

    stDocName = "Quote"
    DoCmd.OpenReport stDocName, acNormal, "Quote Filter"

Exit_cmdPrintQuote1_Click:
    Exit Sub

Err_cmdPrintQuote1_Click:
    MsgBox Err.Description
    Resume Exit_cmdPrintQuote1_Click

End Sub

I suppose I could have it open the report but how would I make it so that it would only print that one quote rather than all of them.

 
Old February 22nd, 2007, 10:38 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Scandalous,
Change this line:

DoCmd.OpenReport stDocName, acNormal, "Quote Filter"

To this:

DoCmd.OpenReport stDocName, acPreview, "Quote Filter"

HTH,

Kevin


dartcoach
 
Old February 22nd, 2007, 11:02 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

Thanks!!

 
Old February 22nd, 2007, 10:26 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default

Antonio-
DO you REALLY want the report to flash on the screen and then immediately print?
In our office users like to see the report on the screen, then at their discretion (and when they are good and ready) print it. I've been just creating just ONE button that previews the report. THen the user can go to the menu and use the print button there. A nice feature is that if the report is multiple pages they can then choose which page(s) they want to print. And I ONLY have to provide a print preview button. :)

HTH,

Loralee

 
Old February 23rd, 2007, 10:45 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

Loralee,

How do you make it so that they can choose which pages can be printed off of the menu?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox problem print preview vs. print jenisageek Access 5 May 2nd, 2008 12:54 PM
help in print preview star20010us General .NET 0 September 8th, 2006 07:06 PM
Print Preview problem snanuwa Access 0 August 7th, 2006 09:26 AM
Print and print preview file on the website withou appleLover General .NET 0 February 19th, 2005 02:24 AM
Print Preview problem aspadda Excel VBA 0 March 17th, 2004 10:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.