Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Status while running long queries (2003 allSPs)

    I have a large number of queries that are run in sequence, some of which take minutes to run. Is there any way I can provide some sort of status as to how far through the process is. Along the lines of"I'm about to start, get 2 beers from the fridge" then "I'm 25% though (or finished all XX updates), you can start on your second beer" - Jokes aside, I am concerned that the user will think nothing is happening because of the time taken, and may close the program
    TIA
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Status while running long queries (2003 allSPs)

    What I usually do is to show which query is running via a text control on the form.
    eg.

    sJ = "Running query 1"
    DoEvents
    Run "Query 1"

    sJ = "Running query 2"
    DoEvents
    Run "Query 2"

    etc etc

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Status while running long queries (2003 allSPs)

    As Pat suggests, just listing the query is a helpful thing - with a bit more sophistication you can show the status bar and the progress of each query. To get really fancy, you can use an Active X control and show progress in a progress bar or similar tool.
    Wendell

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Status while running long queries (2003 allSPs)

    Thanks for the info but I cant even spell sofisticated let alone be it!!
    At present the queries are just in a macro that runs each one in sequence. The Macro is chosen from a switchboard item. I tried messages in the macro but as these require you to click on OK, it defeats the purpose of letting this loong process run unattended.
    Any illumination on either Wendells or Pats approach would be much appreciated
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Status while running long queries (2003 allSPs)

    If you really want to avoid any forms or VBA, turn on the Status Bar in the Tools/Options on the View tab - it will show the progress of an individual query. Then you could use a simple Beep command before each query to indicate you are starting the next query. Otherwise, I would suggest you convert your macro to VBA using the wizard, and then put it behind a form which will let you display each of the query names as you run them - and you can still use the status bar to display the progress of each individual query. (The wizard can be found under Tools/Macros/Convert Macros to Visual Basic.)
    Wendell

Posting Permissions

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