How to display messages when a macro is running multiple queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Justinidea
    New Member
    • May 2012
    • 1

    How to display messages when a macro is running multiple queries

    I have a macro that runs multiple queries. (using Access 2007)

    I want to display on the status bar which query is running so I know where it's at in the process (the macro runs 47 queries).

    I've tried Echo on, Echo off, added status bar text. All I get is the hourglass and maybe that little green progress bar, but I don't know which query is running.

    Anyone know a way to display different messages while the macro is running?

    Thanks
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    @Justinidea
    Are the queries ran in series or are the queries subqueries?

    -zmbd

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32645

      #3
      If you look in Context-Sensitive Help for "Echo" (from Application.Ech o()) you'll see the parameter bstrStatusBarTe xt. Be very careful with using Echo(False) though. It can be very confusing when nothing you do shows on the screen - especially confusing when the code has stopped running.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Don't UI updates not happen until the end of code? Or is it different for macros? You'll probably have to use an asynchronous approach to running your queries.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32645

          #5
          Originally posted by Rabbit
          Rabbit:
          Don't UI updates not happen until the end of code?
          Only if you set it to False. I used to use that method until I designed myself a [frmProgress} form to allow the list of jobs to be listed and ticked off as the jobs progressed.

          Comment

          Working...