By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

Strange new runtime error. Please advise!

P: n/a
After upgrading to Access 2003 (from 2000) I now get a strange new
runtime error on part of my longstanding Error handler code. This
error ONLY happens when I try to run a new form with my same old error
handling code I've used for years. Here's the proc ...

=================== BEGIN CODE ==================
Private Sub Form_Open(Cancel As Integer)

On Error GoTo Form_Open_Error

Me.FormHeader.BackColor = StdClr_FrmHeader
Me.Detail.BackColor = StdClr_FrmDetail
Me.FormFooter = StdClr_FrmFooter
'=========== ERROR HANDLER ===================
ExitHere:
On Error GoTo 0
Exit Sub

Form_Open_Error:
Select Case Err.Number
Case Else
MsgBox "ERROR: " & Err.Number & " (Line: " & Erl & "): " &
Err.Description & _
" in procedure: Form_Open of VBA Document
Form_tblFutureActions " & _
" ," & vbCritical, "Sorry. An error has occurred ..."
End Select

End Sub
======================= END CODE =====================
The above code compiles fine. But when I run the form, Access 2003
breaks and claims there is an Error 13, type mis-match and stops on
the block beginning with "MsgBox" above.

I must be blind because I cannot see where there can be a type
mismatch here.

Any clues?

Thanks folks.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Never mind. I figured it out. Stupid syntax error.
On Mon, 31 Oct 2005 21:12:03 -0600, Lauren Wilson <no****@none.com>
wrote:
After upgrading to Access 2003 (from 2000) I now get a strange new
runtime error on part of my longstanding Error handler code. This
error ONLY happens when I try to run a new form with my same old error
handling code I've used for years. Here's the proc ...

=================== BEGIN CODE ==================
Private Sub Form_Open(Cancel As Integer)

On Error GoTo Form_Open_Error

Me.FormHeader.BackColor = StdClr_FrmHeader
Me.Detail.BackColor = StdClr_FrmDetail
Me.FormFooter = StdClr_FrmFooter
'=========== ERROR HANDLER ===================
ExitHere:
On Error GoTo 0
Exit Sub

Form_Open_Error:
Select Case Err.Number
Case Else
MsgBox "ERROR: " & Err.Number & " (Line: " & Erl & "): " &
Err.Description & _
" in procedure: Form_Open of VBA Document
Form_tblFutureActions " & _
" ," & vbCritical, "Sorry. An error has occurred ..."
End Select

End Sub
======================= END CODE =====================
The above code compiles fine. But when I run the form, Access 2003
breaks and claims there is an Error 13, type mis-match and stops on
the block beginning with "MsgBox" above.

I must be blind because I cannot see where there can be a type
mismatch here.

Any clues?

Thanks folks.

Nov 13 '05 #2

P: n/a
Stupid syntax will getcha every time.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.