Trap Code Interruption?

bionicman

Registered User.
Local time
Today, 12:58
Joined
Jul 22, 2003
Messages
145
Is there a way to trap a code interruption (CTL+ALT+BREAK)? I saw somewhere to trap error 2501, but it doesn't seem to work for me. The error message i get doesn't have an actual error number, it just says "Your Code Execution Was Interrupted".

Thanks in advance!
 
do you want to stop the code interruptions. You need to disable this property. Some properties like this can be disabled in dbs tools startup options, others need code.
 
i don't want to disable it, i want it to be there in case someone needs it, but i would like to trap it, so if someone stops something i can have some code run.

Thanks!
 
its not an error - its just stopping the code.

It really is dangerous to allow it. I can't think of any situation where I would want to break debugged code. You might stop interruption half way through a series of update/append queries etc.
 
So i guess what you are saying is ther is no way to have some code run when someone stops the code?

What i have going on is while my code is running i have a form popup that just says "working" so the user knows the database is doing something. When the code is done the form closes. If the user sees something going wrong while the code is running, i want them to stop it, but then the "working" form is still displayed, so i wanted to have it close when the user stops the code.
 
I don't think you can trap a code break.

You can turn the hourglass on, if you want, rasther than pop a form up.

docmd.hourglass true and
docmd.hourglass false

you could also put a progress bar on the screen if you are running a series of queries - the syscmd function, or search access help for progress bars.
 

Users who are viewing this thread

Back
Top Bottom