Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2009
    Posts
    204

    Unanswered: Status Bar for Queries?

    I have a button that has a bunch of queries in it that update several fields on a large table. It takes a minute or two for all of the queries to process. At first I had it coded as docmd.openquery "..." and it would show at the bottom the status of each query. I changed it to currentdb.execute "...", dbfailonerror, and it's a little quicker it seems, but it does not show the status on the bottom. Is there a way to get something like this?

    Thanks.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,420
    Provided Answers: 7
    put this code into a module
    Code:
    Function StatusBar(Message)
      Dim RetVal As Variant
      RetVal = SysCmd(4, Message)
    End Function

    then when you want to put a message into the status bar

    StatusBar ("Adding " & roundid & String(10 - Len(roundid), " ") & " => " & who & " " & Messtype)
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Oct 2009
    Posts
    204
    I don't know, maybe I am calling the code wrong, but it did not work for me. I have tried that before and after the queries, with still no status bar...

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,420
    Provided Answers: 7
    so you copy the
    Statusbar Function into a Module

    then in you code

    statusBar("Started Query 1")
    docmd.........
    statusBar("Started Query 2")
    docmd..............
    statusBar("Done")
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Nice Myle. I'm going to try that out. Never thought of doing that.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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