Error Handling not active

Fatima

New member
Local time
Today, 18:09
Joined
Apr 5, 2005
Messages
3
Suddenly every error handle in my vba in all Access files (mdb,mde) <=(Sorry:NOT mde only mdb) on my computer became inactive :confused: (I got "Run Time Errors"),
same files on any other computer are working fine
any body know why this could happened?

I'm using MS Access 2003
-I've done "Detect and repair" many times
-Repair the MS Office installation from "Add or Remove Programs"
-Reinstall MS Office from "Add or Remove Programs"
but nothing work for this problem
Is there any solution before I had to uninstall MS Office and reinstall it again?:(
,thanks
 
Last edited:
You have set your code to break on all errors.

Look at Options in code design view.
 
may depend on your code

if you have an error, and DONT run a RESUME statement, then you cannot reapply the error handler

so


Code:
do repeat until false

backtoloop:
        [COLOR="Red"]onerror goto fail[/COLOR]
        somecode
loop

fail:
        msgbox("Error")
        [COLOR="Red"]GOTO backtoloop[/COLOR]

the red line will only trap once, as the error handler is using a goto. In this case, you have not terminated the current error-handler and you cant activate a new one

you have to say instead

RESUME backtoloop


the resume terminates the errorhandler, which can then be reset for the next time
 
YES! Thanks RainLover
that was the problem and it's working fine now!:D
Thanks gemma-the-husky (Dave),but the problem was it's Suddenly stoped working! :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom