Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Question Unanswered: Insane Echo question

    Hi
    In order to avoid annoying blinking while changing between forms I turn off echo while calling function (s) that (among other things) open the form. The echo should be switched on again when finishing executing last function.

    My problem is that it depends from where the procedure is called how many functions that should be executed, then I could end in a situation where I'm not turning on the echo again or turn the echo on to early. (result: this annoying blinking)

    Does anyone have any proposal for a solution to this problem?
    Is it for example possible to "sense" if any functions/querys is still executed?


    I highly appreciate any proposal to this "Insane Echo question"


    Thanks a lot.

    sincerely Vestigo

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Move your Echo calls to the parent event instead. Don't include it in common functions.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    idle thought (i don't use echo, so i don't know if this is valid)

    set .timerinterval = 1

    in the form.Timer()
    me.timerinterval = 0 'switch off the timer
    'execute your stuff here, not in _load()
    'it happens 1 millisec after the form is fully loaded

    consequence:
    -you can't use the timer for anything else (unless you have form-wide variable and an if structure in _Timer)

    izy
    currently using SS 2008R2

  4. #4
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Question Echo off/on/off/on/off/on

    Thanks for your proposal, but I'm afraid they will not function as required.

    I'll give you an example:

    In my main tab form I:
    - switch echo off on tab change
    - execute some code
    - turn echo on.

    In a sub form on one of my main tab pages I got another form with tab pages.
    Changing pages in this sub for also:
    - switch echo off on tab change
    - execute some code
    - turn echo on.

    As the tab page that will be opened in my sub form can vary I get an involuntary echo on/echo off sequence.

    (Izy: I'm frequently using the timer event so this is not an option I'll like to go for)

    Tricky this one, isn’t it?

  5. #5
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Lightbulb TabCtl "On Change" event is the problem

    Actually, the reason to the problem is that I need to use the "On Change" event on "TabCtl" since I can't get the "On Click" event to function.

    Vestigo

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    H'm so you wnat to change a standard behaviour for you application. You are then altering a users perception of what should be haeppening. Its fine if all your users use applcations developed in the same manner, but you are potetnailly causing friction if a users switched between your style of applcations and default. Potentailly this becomes worse if someone decids to roll their own behaviours in 'their' application.

    I always want to take a step back in such cases and ask myself - is this a genuine problem / user requirement or is it just a personal whim. What is a vlaid well reasoned opinin to some is often someone elses prejudice and il considered bias. Far too often I sit back and realise that users don't really give a stuff about such bells and whistles, providing it does the job they are happy. doesn't mean do the lowest common denominator but equally there is precious little time to do such things. time I'd prefer spending on documentation (as if) or down the pub.

  7. #7
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Thumbs up It's got to be worth it

    Hi "healdem"

    You know this song, "… It's got to be perfect, It's got to be worth it, " by Fairground Attraction ? :-)

    You might very well call this a personal whim. But actually some of my customers has comment this "blinking".
    I do not have a pub near by and documentation is fare to boring.
    Solving this annoying problem could be a satisfactory end of the year.


    I wake up this morning with this idea:
    ….turning ON echo should only be possible from within the same sub as where it was switched off. This function 100% as in my dream (or nightmare if you like).

    sincerely
    Vestigo


    First define variables:
    Code:
    Public varEchoOff As String
    Public varEchoOn As String
    varEchoOff=""
    Create two functions:
    Code:
    Function EF(FormCtrlOff As String)
        If varEchoOff = "" Then
            varEchoOff = FormCtrlOff
            DoCmd.Echo False
        End If
    End Function
    
    Function ET(FormCtrlOn As String)
        If FormCtrlOn = varEchoOff Then
            varEchoOff = ""
            DoCmd.Echo True
        End If
    End Function
    In the control where echo is turned on:
    Code:
    Dim CurCtl As String
    CurCtl = Me.Form.Name & "_" & Screen.ActiveControl.Name
    EF CurCtl
            	…. some code
    	…. some more code
    ET CurCtl
    Last edited by vestigo; 12-31-05 at 06:44.

Posting Permissions

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