Updating the status bar at the bottom of the Access Screen

Seti

Well-known Member
Joined
May 19, 2002
Messages
2,916
Is there a way as I run a series of queries through a macro, to have the stauts bar at the bottom of the Access screen show me which query (of many) in my macro is running or alternately, running query x of y?

In Excel, I can use Application.Statusbar = "My Message". I tried the same thing in Access and it appears that it is not supported unless I need to do something first to make it happen.

I currently have about 20 queries and the process takes a couple of hours and I need the user to have some idea of where he/she is in the process.

Thanks for any suggestions.

Seti
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Re: Updating the status bar at the bottom of the Access Scre

Thanks, that works perfectly in my test environment. Hoping the sam eis true for production. If not, I'll be back with a few details on any problems.

Thanks again for the find.
 
Upvote 0
Re: Updating the status bar at the bottom of the Access Scre

The tip mentioned above worked fine in my test environment, but when I went live, I found a problem. I am running about 15 queries and all told they take about 30 minutes to run. I built the progress bar code and implemented it. But, when I run my macro, it initializes the progress bar and then it seems like the query blanks out the status bar and I lose my progress bar until the query ends, then my progress bar updates for a second and then the next query blanks it out again. Does anyone have any ideas? Thanks.

Here is the code I am using:
Code:
Option Compare Database
Function OpenBar()
    Dim RetVal As Variant
    RetVal = SysCmd(1, "Progress Meter", 5)
End Function

Function CloseBar()
    Dim RetVal As Variant
    RetVal = SysCmd(3)
End Function

Function UpdateBar(NumDone As Integer)
    Dim RetVal As Variant
    RetVal = SysCmd(2, NumDone)
End Function

I then use the RunCode command in my macro to run the appropriate functions.

Seti
 
Upvote 0
Re: Updating the status bar at the bottom of the Access Scre

Just curious ... what are you running that requires over 6 minutes per query, in strings of 20 queries? Are we talking huge numbers of records? Slow network connection to linked tables? I think it's possible to reduce the overall query time with a bit of planning -- give us some clues!

Denis
 
Upvote 0
Re: Updating the status bar at the bottom of the Access Scre

There are huge tables with multiple links between each table. There are many intense calculations being performed that update existing tables. I have queries calling other queries. While I might be able to improve overall efficiency, I was hoping that I could get the progress bar working correctly. Even if I improve efficientcy 50%, it will still take 30-40 minutes on my clients PCs.
 
Upvote 0
I think that you will need to create a custom bar in a form as Access will always take back controll of the status bar when a query runs.

Peter
 
Upvote 0
Re: Updating the status bar at the bottom of the Access Scre

Thanks, I'll look into the link and see if I can use it. Appreciate the help.
 
Upvote 0

Forum statistics

Threads
1,221,638
Messages
6,160,994
Members
451,682
Latest member
ogoreo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top