PrintPreview of a report on top of a Modal/Popup form

Posted on 2004-11-19
Last Modified: 2006-11-17

A printPreview which is called from a form which is modal and popup doesn't appear. It seems if it is behind the form. Who know a solution to show the Preview of the Report

Regards, Hugo
Question by:hr_muller
    LVL 41

    Accepted Solution

    You could output it to a snapshot file and display it in a popup form using the Snapshot Viewer ActiveX control.
    LVL 58

    Expert Comment

    You can also use:
        Me.Visible = False
    before opening the report. And add this to the report(s):

    Private Sub Report_Deactivate()
    On Error Resume Next
        Forms("frmModalPopup").Visible = True
    End Sub

    If you have many reports, it's probably not a good idea to create a module for each. In that case, create a function:

    Function BackToMenu()
    On Error Resume Next
        Forms("frmModalPopup").Visible = True
    End Function

    And call that as the report's Deactivate event: =BackToMenu()

    Hope this helps!
    LVL 41

    Expert Comment

    If you have multiple popup forms open, you may need to loop through all open forms and un-popup them :)
    LVL 11

    Expert Comment

    I would just make the form Modal (remove the pop-up). ...  .  You wouldn't have the problem if it's (just) Modal.

    It's just me, plz enlighten where a Modal AND Popup would be beneficial.

    Modal alone works for me.


    Just playing devil's advocate.


    ps:  well, whadaya expect w/ an alias like that eh?  ;)-

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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

    Suggested Solutions

    Title # Comments Views Activity
    Show Balance 3 15
    Access 2010 Security Concern Pop-up 34 44
    Calculate age in Access report 11 22
    Open Args 16 19
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 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

    13 Experts available now in Live!

    Get 1:1 Help Now