Access does not break on Errors

MLUCKHAM

Registered User.
Local time
Today, 21:15
Joined
Jul 23, 2013
Messages
89
I have a large Access 2010 DB. Although I have a lot of error trapping in the database, there are some areas that do not yet have it. I am working on this.

I have a weird issue that when I run the database with AllowByPassKey set to false with the Navigation Pane hidden, if the database comes across a un-handled error it simply ignores it, does not report it to the user.

Even though I have break on all errors set in the module.

I have create a little demo database to demonstrate the issue. What I would like is for the DB to crash on unhandled errors that way I would know they are happening and I could fix them!

:banghead:
 

Attachments

In the db you posted you have "Break on Unhandled Errors".
 
Yeh, makes no difference. Change it to all errors and it is still the same...
 
Not sure why it happens but the settings work for me if the db is opened with the shift key down.
 
Bob, that is the point and the problem.

On a deployed system I want to restrict access to the Navigation Pane hence I hide it and disable the Access Key. However, when in this mode the system will not break on un-handled errors. If there is an issue with the system I would prefer to know about it.

It does crash however using Access Runtime.
 
Perhaps you should put some error handling code in all procedures. You could also create a table to log all errors.
 
Yep, but with 60,000 lines of code it takes a while to get it all in...
 
Download the free mz-tools. That lets you insert error handlers pretty easily.
 
I think the most likely cause of a un-handled error, is that you are still processing a previous error.

until you terminate an error handler with resume, subsequent error handling is ignored.

therefore, if you exit an error handler with goto instead of resume, your programme will continue to run (apparently normally) but with no active error handler.
 
I cannot open your download. It just downloads as attachment.php
 
No, that is not what is happening here. If you look at the test database I have some code against a button that simply assigns a string value to an integer variable. A runtime error if ever I saw one.

And, when loaded with the Nav Pane showing it breaks as it should do. When running under Access Runtime I get a Crash (as I would expect).

But, if the Nav Pane is hidden no break. Not even a hint that anything is wrong. Not a sausage!

Might seem helpful, but actually it is not as that means that a procedure has not run when I expect and the user expects it to. Yes, yes, I know all about error trapping etc etc, but I do expect Access to do what it says it will do which is Break on all unhandled errors.... :eek:

I have uploaded the DB again...
 

Attachments

Users who are viewing this thread

Back
Top Bottom