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.
#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