Removing Debug option when scripts hit errors

Phonik

Registered User.
Local time
Today, 08:35
Joined
Sep 22, 2006
Messages
111
Hi,

I have developed quite a large database for my company to register complaints on. At certain points, a user may encounter an error when a procedure goes wrong and I want to know if there is a way I can remove the option to debug when it pops up saying End or Debug. Some of the users are using Access Runtime and I know that this will not allow them to debug but for those that are Full version users, I need to prevent this....prying fingers! :-)

Many thanks

Gaz
 
I think you can do this with compiler directives.
 
probably the easiest way is to use an mde - that way they can't debug the app anyway. The biggest problem is that presumably you need to be made aware and fix such logic errors.
 
Hi,

Thanks for your responses. You are correct in assuming that I would need to know about the errors.

Gaz
 
Use a custom error handling routine. You can set it up so that the error is logged to a table, which you can then review later. Alternativley, you could even set it up to email you.

If you use a custom error message, the user won't have the option to hit debug. However, a clever user might know that if you hit CTL-BREAK they can then get to the code. Using an MDE can get around this.
 
replace the Debug window with my own

ejstefl said:
Use a custom error handling routine.
- I know how to set up error handling within a sub or function, but how can I trap the errors globally for the whole DB that open the window and ask if the user wishes to debug? In other words "how to use a custom error handling routine to replace the Debug window with my own?"
 
for each form or report you need an on error event. this is a generic handler for any errors not trapped anywhere else

depending what you are trying to do, you may need some additonal code to store the active procedure etc, as the forms on error event might not be able to identify exactly where the errror came from

i dont think you can have one for the whole dbs.

i am not sure off hand what sort of errors are not trappable (if any) - presumably very few normal errors
 
You need to write error handling for EVERY event.

Try:

http://www.access-programmers.co.uk/forums/showthread.php?t=108415

for help on how to write the errors to a table. It will be a big job in a large, existing Db, but well worth it.

For help on speeding up the process of writing custom and often repeated scritps, search google for MZ tools.

It's a great little add in for Access VBA that allows you to add custom stuff at the click of a button.

HTH

Dave
 

Users who are viewing this thread

Back
Top Bottom