Untrappable errors in Access Runtime

DanR

Registered User.
Local time
Tomorrow, 09:52
Joined
Mar 14, 2002
Messages
54
Hello

I've developed an Access database with lots of VBA code. I've just gotten to the stage of deploying it on users' computers running with Access Runtime.

Clicking form buttons to run certain routines causes an error, and the generic error message "Execution of this application has stopped due to a run-time error. The application can't continue and will be shut down".

This is what you'd expect when Access Runtime hits an unhandled error in the VBA code.

The error doen't happen on my machine, even in Runtime emulation mode, so the challenge is to find out what is going wrong.

So I added proper error handling routines to bring up a message box with the error location and description so I can identify and fix the error.

BUT the problem is that I haven't been able to trap the error. It doesn't trigger the error handler in the relevant routine, and doesn't even reach the innocuous first line of code before crashing.

I have also added a new button to the form, which raises an error when clicked. That one triggers the error handler as it should.

I'd love your suggestions about what else I can do to identify the error or otherwise diagnose the problem.

thanks

Dan
 
Could be a reference problem. On the offending machine, I would open up the db in the programmers mode (non runtime and full permsions) and then I check the references to see if any are missing. I would also try to debug (compile) the code to see if their are any VBA errors in your code. I would compile the code on your machine and also on the offending computer.

Did you do a full install of the runtime application from the setup wizard?

Also, all functions and subs must have proper error handling or else the db will close when it encounters a VBA error in the runtime version.

HTH
 
Thanks GHudson

No luck yet, and it's getting to be a big problem. I'm hoping to find a way to capture errors globally, if they are not picked up within the specific module running when they occur.

I have gone through your suggestions and:

1) It isn't possible to run the application in the full programmers mode on the offending machines because they don't have the full MS-Access, only Runtime. If I could do that, it should be a small step to identify the error.

I have checked the references though, and think they're all OK. And if it was a reference problem, would it not occur when the project is opened, or when the form is opened??

2) The module where the error occurs do have proper error handling routines. All errors ought to be handled by the VBA code, and I've checked that the error handling does work. That is, when I deliberately trigger an error, the error message I've written pops up, and the db doesn't crash.

So this error occurs when a particular button on a form is clicked, but before any code for that button is executed. And it doesn't trigger the 'on error' event in the code for that button.

3) Installing Runtime - you might be on to something here. It was done using the setup wizard, but there were some problems with 'administrator permissions' on the machine.
 
Thanks Pat

Sounds right, as I am using DAO, which is not the Access 2000 standard.

But how do I find the article you recommended?

I've had a look in the MSDN library that comes with Office2000 Developer, and also briefly on MSDN.microsoft.com

cheers

Dan
 
Problem solved

Thanks very much Pat & ghudson :D

It was a references problem as you both suggested, although not with DAO.

And those articles were a big help Pat.

cheers
Dan
 

Users who are viewing this thread

Back
Top Bottom