Runtime Problem

G

gagecres

I've been working on a database for 2 months with no problems. Today, for
the first time, I got an error message which read: "Execution of this
application has stopped due to a run-time error. The application can't
continue and will be shut down." I have never seen this message before and I
have no idea what is causing it. Do I just need to reinstall the run-time
engine? Please help!!!!!
 
T

Tom van Stiphout

On Mon, 19 Apr 2010 19:35:01 -0700, gagecres

No.
You get this error when you have code that triggers an error and you
don't have an error handler. Quick example:
private sub Button1_Click()
dim x as integer
x=1/0
end sub

When you run this code in the runtime, it will product your quoted
error.
You can add your own error handler and the problem goes away. A very
simple error handler:
private sub Button1_Click()
on error goto err_handler
dim x as integer
x=1/0
exit_handler:
exit sub
err_handler:
msgbox "An error occurred: " & Err.Description
resume exit_handler
end sub

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top