| re: Strange new runtime error. Please advise!
Never mind. I figured it out. Stupid syntax error.
On Mon, 31 Oct 2005 21:12:03 -0600, Lauren Wilson <nospam@none.com>
wrote:
[color=blue]
>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.[/color] |