none
Status meassages disappear RRS feed

  • Question

  • I use access with a lot of VBA. To follow the status of the process I use docmd.echo among which the eclapsed time and the expected time to go.

    The process is relative long (about 10 minutes ). The echos are show on tha status bar, but sometimes after a while they staus bar information gets lost (blanc), while the program is still going on. You get a mouse signal with a rotating blue circle and in the upper left corner of the access window it shows the message: "startform (does not react)".

    How to prevent this?

    With kind regards

    Jan lichtenbelt

    Saturday, September 23, 2017 1:08 PM

Answers

  • Hi Jan,

    It seems your issue has been resolved, if so, I would suggest you mark the helpful reply as answer which is the way to close a thread here.

    Regards,

    Tony


    Help each other

    Tuesday, September 26, 2017 8:41 AM

All replies

  • Hi Jan. Some things you can prevent if you know what's causing them and you can control the situation. However, other things are out of our control so it's not possible to prevent them. For example, let's say your VBA sends out a request to a website for some data but your Internet connection was intermittent, then there is nothing you can do in your code to fix it. You are the only one who knows what your code is doing, so you'll have to try and trace the problem by stepping through your code. Just my 2 cents...
    Saturday, September 23, 2017 2:13 PM
  • Dear theDBguy

    Thanks for helping. But the VBA program just does a lot of tested, changes etc. on an array(16,16,16). As far as I know, nothing external actions.

    The problem is not always, but sometimes. That makes it extra diffucult to solve.

    Kind regards

    Jan

    Saturday, September 23, 2017 5:57 PM
  • Right after you issue a status command, place a doEvents. That should give some of the “event que” a chance to update.

    Regards,

    Albert D. Kallal (Access MVP, 2003-2017)

    Edmonton, Alberta Canada

    Saturday, September 23, 2017 6:18 PM
  • If you are getting a form not responding message and code takes 10 minutes then something is wrong with the form iteslf and/or the VBA code in the module. Set a breakpoint at the beginning of the VBA code routine and step through each line to determine where it is failing. Then you will know what line to correct. Does the code compile without error?
    Saturday, September 23, 2017 6:53 PM
  • Dear Albert D. Kallal

    DoEvents helps to solve the problem. Puting is after the doCmd.Echo will hardly make the staus bar readable (to shor visible). However, puting the DoEvents before the Docmd.Echo solves the problem as it should be.

    Thanks a lot

    Jan Lichtenbelt

    • Proposed as answer by Tony---- Tuesday, September 26, 2017 8:40 AM
    Sunday, September 24, 2017 11:20 AM
  • The echo command only turns off and on the echoing – it likely not required (or only required if you turned off echo someplace else in the application).

    DoEvents simply tells access to “process” the event que for things like updating the screen or status bar. If you start some heavy processing, then the “event que” is put on hold until the code completes. So in the case of heavy processing code, the screen or status will not update until that heavy code is done. Think of doevents allowing Access to gulp a breath of fresh air in which these pending updates are allowed to run.

    Regards,

    Albert D. Kallal (Access MVP, 2003-2017)

    Edmonton, Alberta Canada

    Sunday, September 24, 2017 9:31 PM
  • Hi Jan,

    It seems your issue has been resolved, if so, I would suggest you mark the helpful reply as answer which is the way to close a thread here.

    Regards,

    Tony


    Help each other

    Tuesday, September 26, 2017 8:41 AM