Re: Error Message different in MDB and MDE
From: david epsom dot com dot au (david_at_epsomdotcomdotau)
Date: 09/14/04
- Next message: Dirk Goldgar: "Re: Random record selection using VBA"
- Previous message: PavelKo: "Re: ERROR- Update' or CancelUpdate without AddNew or Edit"
- In reply to: Albert D. Kallal: "Re: Error Message different in MDB and MDE"
- Next in thread: Albert D. Kallal: "Re: Error Message different in MDB and MDE"
- Reply: Albert D. Kallal: "Re: Error Message different in MDB and MDE"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Sep 2004 10:14:42 +1000
These are the error messages I quoted earlier:
-------
The expression On Click you entered as the event property setting
produced the following error: Overflow.
The expression may not result in the name of a macro, the name of a
user defined function, or [Event Procedure].
There may have been an error evaluating the function event or macro.
-------
Run-time error '6':
Overflow
-------
They are in fact different messages, although both have been constructed
using a text string from the error resource "overflow". Both have included
information that the designer thought was relevant to the target user:
>From the VBA designer:
"Run-Time error '6':"
And from the Access designer:
"The expression may not result in the name of a macro...."
-------
For the example message, this might not matter much to your users,
but in the development environment, my message said:
Please discard record and try again.
Overflow
from mcModuleLimit.gfnLimitPercentage.3560
from mcModuleLimit.gfnInsertLimit.2820
from frmMM_Contract_Add.fn_Save.562
...and when Access unexpectedly substituted a different message, it
caused confusion to both the client and the support team.
Now I would argue with the Access designers anyway: They know that
the error was an Overflow error, why confuse things with the general
purpose string referring to general errors in the expression evaluator?
And that additional text DID confuse us: I expect to see that text
when, (normally due to build and reference problems), I have an
expression that does not result in the name of a user defined function.
But that would be assuming that this was a deliberate design decision.
And it would be really getting away from (which I still think is a
relevant issue) that we have a previously undocumented situation where
the error description is discarded, and a different error description
is substituted.
(david)
"Albert D. Kallal" <PleaseNOOOsPAMMkallal@msn.com> wrote in message
news:uR66RVUmEHA.3712@TK2MSFTNGP15.phx.gbl...
> "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
> news:OirLisSmEHA.1520@TK2MSFTNGP10.phx.gbl...
>
> > No, It's not the disappearance of the 'debug' and 'end' buttons
> > that threw me. It's the fact that it's a completely different
> > /message/. And the fact that the difference is totally undocumented.
> >
> > I actually have users that report the error description in some
> > circumstances, and I use the error description to locate and fix
> > data-dependent exceptions. How's this grab you: I thought I
> > could do that.
> >
> > It may not be clear from the example, but Access has actually
> > discarded my custom error message, and substituted a different
> > one.
>
> Hum...that is not clear?? Are you saying that if you trap the divide by
zero
> error, you get a deifernt results?
>
> In other words, if we use:
>
> Private Sub Detail_Click()
>
> Dim i As Integer
>
> On Error GoTo Myer
>
> i = i / 0
>
> Exit Sub
>
> Myer:
>
> Dim im As Integer
> Dim strT As String
>
> im = Err.Number
> strT = Err.Description
>
> MsgBox "error number = " & im & vbCrLf & _
> "Description = " & strT
>
> Resume Next
>
> End Sub
>
> I find that the above reuslts in teh same mesage in a mdb, a mde, and also
> when run as a runtime?
>
> And, if you wanted to remove the "Microsoft access" title in the msgbox,
and
> use "your" application name,
> you can use (assuming you set the application title in the startup
options).
>
> MsgBox "error number = " & im & vbCrLf & _
> "Description = " & strT, , CurrentDb.Properties("AppTitle")
> :
> Perhaps some value, or some other thing is triggering yet another error
> message, and you loosing the current err number/description?
>
> I am using a2003...but I don't think results would be different for
> a2000-a2003 versions.
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal@msn.com
> http://www.attcanada.net/~kallal.msn
>
>
- Next message: Dirk Goldgar: "Re: Random record selection using VBA"
- Previous message: PavelKo: "Re: ERROR- Update' or CancelUpdate without AddNew or Edit"
- In reply to: Albert D. Kallal: "Re: Error Message different in MDB and MDE"
- Next in thread: Albert D. Kallal: "Re: Error Message different in MDB and MDE"
- Reply: Albert D. Kallal: "Re: Error Message different in MDB and MDE"
- Messages sorted by: [ date ] [ thread ]