How to maintain maximized report when filtering by dialog box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • J360
    New Member
    • Aug 2008
    • 23

    How to maintain maximized report when filtering by dialog box

    Access 2003/ XP

    Hi,

    I have a report that has its On Open event set to open a form in the style of a dialog box

    [Code]
    Private Sub Report_Open(Can cel As Integer)

    DoCmd.OpenForm FormName:="A_fr mAvpBrTc", _
    WindowMode:=acI con

    End Sub
    [Code]

    The dialog box opens underneath the report. Also, the report shrinks when I click in dialog box. The dialog box is used to dynamically filter the report and works fine.

    How can I get the report to open with the Dialog ontop of it? Also, how do I keep the report maximized while making selections in the dialog box?
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by J360
    Access 2003/ XP

    Hi,

    I have a report that has its On Open event set to open a form in the style of a dialog box

    [Code]
    Private Sub Report_Open(Can cel As Integer)

    DoCmd.OpenForm FormName:="A_fr mAvpBrTc", _
    WindowMode:=acI con

    End Sub
    [Code]

    The dialog box opens underneath the report. Also, the report shrinks when I click in dialog box. The dialog box is used to dynamically filter the report and works fine.

    How can I get the report to open with the Dialog ontop of it? Also, how do I keep the report maximized while making selections in the dialog box?

    1. Set popup and modal properties of your dialog form to yes. (if this impacts your filter, set popup = yes, set modal =no and eliminate acDialog mode in #3 below)
    2. In the report's Open event code, place the following code after the open form command:
    DoCmd.Maximize
    3. change your open form command to open in dialog mode:
    DoCmd.OpenForm "Your Form", acNormal, , , , acDialog

    Comment

    • J360
      New Member
      • Aug 2008
      • 23

      #3
      Thanks, that worked perfectly.

      Comment

      Working...