Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2005
    Location
    Mamaroneck, New York, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determine the status of Echo (A2K/9.0.4402 SR-1)

    I have a procedure in a form that turns echo off at the beginning and on
    again at the end. That's fine, except that when the procedure runs, it
    requeries other subforms that also need to turn echo on and off in other
    situations. So the problem is that when my procedure hands off to another
    procedure that turns echo on and off, at the end of this second procedure
    echo is turned off and remains so for the rest of the calling procedure.

    I thought of 2 possible fixes:

    1. Obviously, turn Echo off again after the second procedure hands off back
    to the first one. But the screen updates momentarily between the 2 events.

    2. I would prefer to set a blEcho boolean variable at the beginning of the
    second procedure that will reflect the current condition of the Echo when the
    procedure starts and replace Echo False at the end of the second procedure
    with Echo blEcho. That way, when the second procedure runs under other
    circumstances, if Echo was false when it began, it will be false when it ends,
    but if Echo was true when the procedure began, it will not be set to false at
    the end.

    That leaves me with a problem. How do I set the blEcho variable to the Echo
    condition at the start of the second procedure? I tested in the immediate
    window a couple of obvious methods, but I can't find a way to determine
    Echo's true/false setting. Any suggestions?

    Thanks,

    Bill

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Determine the status of Echo (A2K/9.0.4402 SR-1)

    Define a global variable blnEchoOff in a standard module. Set it to True at the beginning of the first procedure when you turn Echo off, and reset it to the default False at the end when you turn Echo on again.

    In all other procedures, test blnEchoOff and only set Echo if the variable is False, leave it alone if the variable is True.

    BTW, you don't need to insert line breaks in your posts, the browser will wrap the text automatically. You only need to press Enter when you want to start a new paragraph.

  3. #3
    New Lounger
    Join Date
    Nov 2005
    Location
    Mamaroneck, New York, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine the status of Echo (A2K/9.0.4402 SR-

    Thanks once again Hans. I will follow your suggestion.
    But, I still find it curious that there's no method for testing Echo for it's current state. Is it because it's an application object?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Determine the status of Echo (A2K/9.0.4402 SR-

    In Word and Excel, it's a property of the Application object (ScreenUpdating) that can be read and set. I don't know why it's implemented differently in Access.

Posting Permissions

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