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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
!!! 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 | |
|
|