Access2000: Displaying information when procedure is running.


A

Arvi Laanemets

Hi


In Excel applications, I use StatusBar for subject. I.e.

....
oldstatusbar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
....
Application.StatusBar = SomeTextString
....
Application.StatusBar = False
Application.DisplayStatusBar = oldstatusbar
....


In my Access application, I call a procedure from an unbound form, which
processes some huge scope of values. This takes some time (hours), and I
want some information about it to be displayed (something like "## % is
processed.") without any user activities like pressing OK etc.
I didn't find anything applicable like Excel's StatusBar in Access so long.
The closest try was to have a label on form, which is made visible when
calculation starts, and which is recalculated and refreshed every time the
percentage (as Integer) changes. But it didn't work as exepted - the label
caption is visible and changing in debug mode, but nothing visible happens
otherwise.


Can someone help me with this!
Thanks in advance!
 
Ad

Advertisements

S

Stefan Hoffmann

hi Arvi,

Arvi said:
I didn't find anything applicable like Excel's StatusBar in Access so long.
The closest try was to have a label on form, which is made visible when
calculation starts, and which is recalculated and refreshed every time the
percentage (as Integer) changes. But it didn't work as exepted - the label
caption is visible and changing in debug mode, but nothing visible happens
otherwise.
You need to call Me.Repaint after changing your status label. Otherwise
you may use the Access status bar:

http://www.meadinkent.co.uk/astatus.htm


mfG
--> stefan <--
 
Ad

Advertisements

R

RoyVidar

Arvi Laanemets said:
Hi


In Excel applications, I use StatusBar for subject. I.e.

...
oldstatusbar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
...
Application.StatusBar = SomeTextString
...
Application.StatusBar = False
Application.DisplayStatusBar = oldstatusbar
...


In my Access application, I call a procedure from an unbound form,
which processes some huge scope of values. This takes some time
(hours), and I want some information about it to be displayed
(something like "## % is processed.") without any user activities
like pressing OK etc. I didn't find anything applicable like Excel's
StatusBar in Access so long. The closest try was to have a label on
form, which is made visible when calculation starts, and which is
recalculated and refreshed every time the percentage (as Integer)
changes. But it didn't work as exepted - the label caption is
visible and changing in debug mode, but nothing visible happens
otherwise.


Can someone help me with this!
Thanks in advance!

When assigning values to a form label when you're executing code,
you'll probably need a DoEvents just after the assigning.

forms("frmMyForm").controls("lblMyLabel").Caption = "Still ..."
DoEvents

Note that this will allow the app to process mouse klicks and
keystrokes, so you may have to handle that, so that the you don't
risk starting the same process again.

You can use SysCmd to use the status bar, there's a sample here
http://groups.google.com/group/microsoft.public.access/browse_frm/thread/38a81c095eb1d4e7/
(watch for linebrak in the link) as well as other samples.

Here's another one
http://groups.google.com/group/microsoft.public.access/browse_frm/thread/a04f81db9ef45f73/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top