Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003

    Unanswered: Terminate Running Module

    Hi All,

    Looking for some helpful hints on the following -

    Is it possible to terminate a running module (specifically, a module that is in the process of pasting data into a table) through code in another module? I've only ever been able to terminate the module by clicking 'reset' while the module-window was open...? Have been through the help files and nothing useful has come up - if anyone has any suggestions they would be gratefully received.

    Thanks a million


  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    two problems:

    #1 getting control in moduleB whilst code in moduleA is executing.
    depending on circumstances, doevents() loops might fix it. i have a few "cancel" buttons that try to work like this, but it's a long way from satisfactory... mouse-click timing is everything, and in my case it's just for loooooong report jobs, so no data gets hurt. if you can get control B can set a global that A checks every so often as it loops.

    #2 (and most tragic) bailing out halfway through a process leaves your db in an indeterminate state.

    why would you want to do this? the only scenario that comes to mind: your user goes temporarily mad -

    a solution might include:
    - enclosing everything in a transaction with a final commit/rollback prompt
    - making temporary tables and asking the user if the end-result was really what he intended before you copy to the real database


Posting Permissions

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