Link to home
Start Free TrialLog in
Avatar of csehz
csehzFlag for Hungary

asked on

VBA Access 2000 - Status of macro run

Dear Experts,

Could you please have a short look on the attached picture, I am not sure what is the name exactly of that status bar, but when a query runs in Access that used to be in the bottom left corner until it finish the run.

Is it possible to activate similiar at a code run?

Basically I have buttons which starts macros with the pressing, but I have no information in the meantime whether it finished already or not. This is why would target such status check

thanks,
Running-query.jpg
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

You can display the progress meter with some code by using the SYSCMD() function.  The function call looks like this:

ReturnValue = SysCmd(action[, text][, value])

and here are the constants you can use:

acSysCmdInitMeter      Initializes the progress meter. You must specify the text and value arguments when you use this action.
acSysCmdUpdateMeter      Updates the progress meter with the specified value. You must specify the text argument when you use this action.
acSysCmdRemoveMeter      Removes the progress meter.
acSysCmdSetStatus      Sets the status bar text to the text argument.
acSysCmdClearStatus      Resets the status bar text.

  Do you need more?

JimD.
Avatar of csehz

ASKER

Jim thanks, sorry I am not too familiar with this yet and hard to imagine in working, could you have a short look on the attached code, how it could be tested in a short example?

I have just imagined a short loop and until its run, the "Progress message" shouild be in the left bottom corner.
Public Sub Test()

    SysCmd acSysCmdInitMeter, "Progress message", 100
    SysCmd acSysCmdUpdateMeter, 100


For i = 1 To 100
i = i + 1
Next i

    SysCmd acSysCmdClearStatus

End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of csehz

ASKER

Jim thanks very much, both the small example and also the database with demos, you are very helpful I learned a lot of today