A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Error message different in MDB and MDE



 
 
Thread Tools Display Modes
  #1  
Old September 20th, 2004, 12:36 AM
david epsom dot com dot au
external usenet poster
 
Posts: n/a
Default Error message different in MDB and MDE

In an MDB, an unhandled error in a form event gets a VB msgbox, with a VBA
error message.

The same unhandled error in an MDE gets an Access msgbox, with an Access
error message.

To my surprise and disgust, the production copy of my database behaves
differently than my development copy.

For those who are interested, I have tested with a simple error in the click
event of the detail section of a form:

Private Sub Detail_Click()
Dim i As Integer
i = i / 0
End Sub

In the MDB version, I get an error message like this:
Microsoft Visual Basic
Run-time error '6':
Overflow

In the MDE version, I get an error message like this:
My Application Name
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.

Since the MDE version is an Access MsgBox, the first section of the message
is bold.
Also, although you can't see it in this example, it discards err.description
and uses it's own description of the error.

For comparison: If you use an error handler with a msgbox, you get this:
Microsoft Access
Overflow

Which is Err.Description in a VBA msgbox with the caption incorrectly
supplied by Access.



(david)


  #2  
Old September 21st, 2004, 12:47 AM
david epsom dot com dot au
external usenet poster
 
Posts: n/a
Default

!!! This is not a new posting. My news supplier is having problems.

(david)

"david epsom dot com dot au" david@epsomdotcomdotau wrote in message
m.au...
In an MDB, an unhandled error in a form event gets a VB msgbox, with a VBA
error message.

The same unhandled error in an MDE gets an Access msgbox, with an Access
error message.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.