OK, the last time didn't get an answer, let's see if I can explain it
better. (Someone else here _must_ have done this at some point?)
I have a progress-meter type thing set up to follow the compacting of a
database, using Michael Kaplan's COM add-in. The plug-in exposes an
event as the the "pieces" are completed; this event includes a Cancel
argument, identical in nature to forms' BeforeUpdate and
BeforeDelConfir m events, etc.--set it to non-zero, and something should
stop, so says the documentation.
The difference is that those are validation-type cancels, and this is
an interrupt-heavy-procedure-outside-Access-type cancel. And it
doesn't work, or at least I don't know how to make it work; I click a
cancel button, the progress meter flickers briefly, and the compacting
continues. (DoEvents and DoCmd.CancelEve nt have been tried in every
conceivable combination.)
Here are my questions:
1. If you expose an OnIncrement-type event with a Cancel argument, but
the procedure is intensive, can it still be cancelled?
2. Is "RaiseEvent " the same thing as calling the On_Event procedure?
In other words I'm not using a public class, but merely instantiating
the library object in my form module. Is this wrong? Do I have to
Raise in a class and Sink in a form class to get this to work?
3. More generally, how does one stop a fat procedure mid-execution, if
its code is deeper than Access? Or can you?
(FWIW you can't cancel menu-based compact and repair either, without
CTL-ALT-DELint out of Access...)
I've been up and down this group's google history, and no one seems to
have posted about these sorts of events before. And Monsieur Kaplan
does indeed mention the perils of unsupported plug-ins on his site. So
perhaps no one is silly enough to take this on...
Thanks in advance for any thoughts/silliness you might have/exhibit.
My last attempt at this question can be read here:
http://groups-beta.google.com/group/...6e32fdd929eab6