Results 1 to 5 of 5
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Screen display while opening report (Access 2003)

    I have a continuous form that displays about 60 records. This form is a little slow, because the query behind it involves summing data from a number of different tables, then running a custom function in each record , but it works OK.

    At the top of the form is a "Print" button that opens a report showing very similar information. Again I expect it to take a little while, but it works Ok and the time delay is about 6 seconds.

    When I click the print button, the screen initially goes blank, with just the record selectors from the continuous form present, then the form reappears (and the onactivate event fires again, causing a requery of the form), then finally the report opens in front of the form.

    I want to improve the screen display. I have tried various combinations of hiding the continuous form , opening the report hidden then showing it later, displaying a "Please wait" form but nothing improved the display. All of these options just made it worse. Any suggestions?
    Regards
    John



  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Screen display while opening report (Access 2003)

    Does it help if you insert

    DoCmd.Echo False

    before the instruction that opens the report, and

    DoCmd.Echo True

    after it?

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Screen display while opening report (Access 2003)

    Thanks

    Yes it does help of course.

    Is there any actual difference between docmd.echo false and application.echo false?

    I am trying to put a message in the status bar so I have:

    Docmd.echo false, "Please wait while the report is calculated and displayed"
    Docmd.openreport strReportname, acpreview
    Docmd.Echo true

    My status bar message, flashes on for a fraction of a second, then the status bar goes blank, then displays "running query " and gives a progress bar.

    I tried moving Docmd.Echo true into the format event of the report footer. That did not help keep my message on the screen.
    Regards
    John



  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Screen display while opening report (Access 2003)

    DoCmd.Echo and Application.Echo are equivalent. The online help says that DoCmd.Echo is kept for compatibility reasons, Application.Echo is "better" in the sense that it is more "modern". But they act the same. Since Application is the root object, you can even omit it and simply use Echo.

    If you want to set the status bar text, it's better to use SysCmd:

    SysCmd acSysCmdSetStatus, "Please wait while the report is calculated and displayed"
    Echo False
    DoCmd.OpenReport ...
    Echo True
    SysCmd acSysCmdClearStatus

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Screen display while opening report (Access 2003)

    Thanks again

    I often think that I am forgetting things at about the same rate that I learn new stuff!

    I did know about SysCmd acSysCmdSetStatus but ....
    Regards
    John



Posting Permissions

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