B
boborta
I would like to be able to be able to invoke code that will paste in a
standard error handler. The code is currently held in a text file. I
open this file and copy/paste it into places where needed - not already
done by Access. From time to time I have to customize this 'standard'
error handler, but that is okay. At work our PC's are locked down, so
add-ins cannot be installed. Does someone have a sample of code that
would do this?
Standard handler
'-------------------------------------------------------------
' Purpose:
'
' Author : XXX XXX, 04/07/06
' Employer
' Phone: XXX-XXX-XXXX
' E-Mail: (e-mail address removed)
' Notes :
' Tables:
' Forms:
' Reports:
' Calls:
'-------------------------------------------------------------
' Revision History
'-------------------------------------------------------------
'
'=============================================================
Dim dbe As DAO.DBEngine
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim sql As String
On Error GoTo HandleErr
Set dbe = CreateObject("DAO.DBEngine.36")
Set db = CurrentDb()
ExitHere:
set db = nothing
set dbe = nothing
Exit Function
HandleErr:
MsgBox Err & ": " & Err.Description
Resume ExitHere
Thanks for you input.
standard error handler. The code is currently held in a text file. I
open this file and copy/paste it into places where needed - not already
done by Access. From time to time I have to customize this 'standard'
error handler, but that is okay. At work our PC's are locked down, so
add-ins cannot be installed. Does someone have a sample of code that
would do this?
Standard handler
'-------------------------------------------------------------
' Purpose:
'
' Author : XXX XXX, 04/07/06
' Employer
' Phone: XXX-XXX-XXXX
' E-Mail: (e-mail address removed)
' Notes :
' Tables:
' Forms:
' Reports:
' Calls:
'-------------------------------------------------------------
' Revision History
'-------------------------------------------------------------
'
'=============================================================
Dim dbe As DAO.DBEngine
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim sql As String
On Error GoTo HandleErr
Set dbe = CreateObject("DAO.DBEngine.36")
Set db = CurrentDb()
ExitHere:
set db = nothing
set dbe = nothing
Exit Function
HandleErr:
MsgBox Err & ": " & Err.Description
Resume ExitHere
Thanks for you input.