Originally posted by Sander78: I am aware that there is a way to disable the logging: Log.enable = 0
But now I am wondering if there is a way to disable the error handling (error traping).
<font size="2" face="Verdana, Arial, Helvetica">As Nanook said, an error has to be dealt with (you have to tell your script what to do in case of a problem).
You can redefine the standard handling using On Error Call and On Error End.
In the error routines you can use the system variables Err, ErrMsg and a few more
to determine what error happened and where,
and use Resume or Resume Next to resume execution (at the same or next statement).
Note that errors are dealt with in a hierarchic fashion:
you can let your error routine default to the previous error handler with the Error function.
But if the control is not found, QAR will go into the error routine and writes and error note in the log.
But for me there is nothing going wrong at this point. So I disable the logging so QAR won't write an error note in the log.
But I thought it might be better if QAR doesn't get into the error routine at all at this point.
Or maybe I should use a different construction to check for the presence of a field.
<font size="2" face="Verdana, Arial, Helvetica">You can write your error handler to deal with this perfectly.
Check what error is generated by a missing Ctrl.
Use an "On Error Call myerrfunc" line, and let your function myerrfunc do a "Resume Next"
when encountering that specific error.
(And just call "Error" for all others).
The line in your code after the Ctrlenabled(hCtrl) should check
whether the error occured, and deal with that.
If it becomes too cumbersome to handle each Ctrlenabled() that way,
write a wrapper function around it (dealing with the error handling and all).