Hi all,
I have a piece of code in one of my databases that runs 22 queries to import, delete, and append external data to the local tables. This process--due to one or two large queries in the source database--takes around 2-3 minutes, which is not a problem in itself.
However, I have noticed that a user can press the ESC key when the queries are running which triggers "Error 3059: Operation canceled by user." for the current query. What's even worse is that pressing the ESC key in another application e.g. Excel will also trigger this behaviour in Access even though the window is not active. I have tested this with both dual-screen and single-screen setups.
The queries are running through db.Execute
Edit: I forgot to mention that a simple "Please Wait" Access (not vba) form is loaded for the duration of the procedure.
Is there any way to disable the ESC key while the import code runs so that queries cannot be canceled? I've tried turning off the "EnableSpecialKeys" property but I still observe the same behaviour.
Cheers
I have a piece of code in one of my databases that runs 22 queries to import, delete, and append external data to the local tables. This process--due to one or two large queries in the source database--takes around 2-3 minutes, which is not a problem in itself.
However, I have noticed that a user can press the ESC key when the queries are running which triggers "Error 3059: Operation canceled by user." for the current query. What's even worse is that pressing the ESC key in another application e.g. Excel will also trigger this behaviour in Access even though the window is not active. I have tested this with both dual-screen and single-screen setups.
The queries are running through db.Execute
Edit: I forgot to mention that a simple "Please Wait" Access (not vba) form is loaded for the duration of the procedure.
Is there any way to disable the ESC key while the import code runs so that queries cannot be canceled? I've tried turning off the "EnableSpecialKeys" property but I still observe the same behaviour.
Cheers
Last edited: