ECHO OFF applying to MULTIPLE Macros or MODULES!

Discussion in 'Access General' started by JHB, Mar 23, 2013.

  1. JHB

    JHB Guest


    I have a number of macros and modules which call other macros and
    modules for special functions. The internal working of these modules
    are of no interest to the end useres, and I want to surpress screen
    refreshing for ALL of them.. Echo off is clearly one way, but every
    time I call another module the echo off condition is reset. Is there
    ANY was to have echo off, or some similar command, applied to a whole
    bunch of activities by ONE call?. It would be a delight to be able to
    surpress screenb updating over the total range of activity controled
    by one control module.

    Thanks in advance

    John Baker
    JHB, Mar 23, 2013
    1. Advertisements

  2. JHB

    Puppet_Sock Guest

    The concept is layering. At some point you start things up.
    That happens through an entry layer. If it's from a user
    clicking a button, then the code the button calls is the
    user interface layer. The interface layer calls a security
    layer. The security layer turns off what you want off,
    then it calls the next layer,which is the working layer.
    The working layer does all the
    stuff that is supposed to be done. When it finishes, it
    returns to the security layer, which turns stuff back
    on for the user, then returns to the user interface
    layer. The user interface layer makes sure all the
    stuff is refreshed as it needs to be, redrawn, refetched
    from cells, etc. Then it ends.

    This way, working layer stuff can call other working
    layer stuff. It never calls stuff outside the working
    layer. Security layer stuff calls working layer stuff
    only to start a task. And user layer stuff only calls
    the working layer through the security layer.

    So a security layer routine will turn stuff off, and
    another will turn it back on. Then each entry to the
    working layer gets a cover in the security layer that
    calls the "off" routine, then the working routine, then
    the "back on" routine. And the user interface only
    calls these covers.

    To get this pattern, you need to be able to refactor
    your code so that you have your work layer code
    arranged neatly into routines that can be called
    from outside (which get security covers) and those
    that are only called from inside (which don't).
    Puppet_Sock, Mar 25, 2013
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.