I want the user of an Access database to be able to interrupt and exit procedures that involve long loops.
I could trap the KeyDown event of <Escape> so that it changes the value of a global variable whose value gets checked within the loop and so permits code execution to pass out of it, but that would slow down the procedure even further.
Does Access have an equivalent of Excel's Application.EnableCancelKey property (set to xlErrorHandler would do the trick), or does anyone have their own improvised equivalent?
Thanks.
Microsoft AccessMicrosoft ApplicationsMicrosoft Office
Last Comment
Jeffrey Coachman
8/22/2022 - Mon
als315
You can interrupt execution with Ctrl+Break keys.
TimHudspith
ASKER
But that's not a proper solution is it? Variables and objects in the procedure don't get cleaned up properly.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.