| re: Error trapping in Access 2003
"RoyVidar" <roy_vidarNOSPAM@yahoo.no> wrote in message
news:mn.7ce97d65315e8169.33955@yahoo.no...
[color=blue]
> My first guess, would be the setting for error trapping. In VBE - Tools
> | Options - General Tab - make sure it's set to Break on Unhandled
> Errors.[/color]
Interesting point. Given that the Tools -> Options submenu is
"grayed out" until you load a database, I had assumed that this
meant that all options were saved with the .mdb file. That and
the fact that at least one option (Compact On Close) most
definitely IS saved with the database.
However, I was wrong about this. In fact, this is one of the
murkiest and worst-documented features of Access. For instance,
in the online help page "Set Options from Visual Basic" there is
a note at the bottom of the page advising the developer to set
Error Trapping to 2, when a project is completed. However, the
fact that "Error Trapping" does NOT appear in the list of Options
that may be set from VBA code further reinforces the myth that
such settings are saved with the .mdb file. The inference is that
as long as you manually set the Error Trapping to "Break on
Unhandled Errors" before you send the file off to the customer,
all will be well...
However, the good news is that this is nothing to do with Access
2003 (there are some peculiar bugs in that edition but this is not
one of them).
And the moral of this story is: ALWAYS make sure that the
Form_Open() event procedure of your startup form contains this line:
Application.SetOption "Error Trapping", 2 |