Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Posts
    8

    Unanswered: Report to display always on top?

    I have a report, that I want to display on top of the form that called it.

    This is how my db works at the moment:
    1. Main Menu form is displayed to user
    2. User clicks button on Main Menu - this opens a DIALOG form ('search' form)
    3. On the DIALOG form, user clicks to generate a report
    4. Report is generated, but is displayed BEHIND dialog form - therefore cannot see the report properly.

    I need the 'search' form to be 'modal' because I don't want the user re-activating the MAIN MENU, while it is still open

    Is there any way of making my report print preview sit ON TOP of my 'search' form? i.e. is there a way of making my report pane modal as well?

    thanks.
    -soc

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Question Can u use this

    can you use the function RepotName.Show 1

  3. #3
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Exclamation or

    ReportName.ActiveControl

  4. #4
    Join Date
    Sep 2003
    Posts
    8

    Re: Can u use this

    Originally posted by Marvels
    can you use the function RepotName.Show 1
    No that doesn't work.

    the code that i use to generate the report is:

    ls_Doc = "Rpt_Trial_Balance"
    DoCmd.OpenReport ls_Doc, acPreview

    but it doesn't display the report 'on top'

  5. #5
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Question Try this option

    Dim rptCurrentReport As Report


    DoCmd.OpenReport "Qry_Naam", acPreview

    Set rptCurrentReport = Screen.ActiveReport

  6. #6
    Join Date
    Sep 2003
    Posts
    8

    Re: Try this option

    Originally posted by Marvels
    Dim rptCurrentReport As Report


    DoCmd.OpenReport "Qry_Naam", acPreview

    Set rptCurrentReport = Screen.ActiveReport
    thanks for the suggestion, but unfortunately that code only works if I set my 'search' form as a 'normal' form. Problem is, that if I set the 'search' form to being 'normal', users can activate the main menu without closing down the 'search' form.

  7. #7
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Exclamation yes but ....

    youll have to write the code so that the menu is enabled after the "show"
    SO something like this

    Set rptCurrentReport = Screen.ActiveReport

    FormName.Menu_File =false

    (You can even set the tag of the menu)
    FormName.Menu_File.ToolTip = "Please First close all reports"


    '(And in the report_Unload you set the code )

    FormName.Menu_File =true

    PS don't pin me on the code this was quick and verry dirty :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •