'======================================== Sub zErr(sApp, sMod, iLine, oErr) 'General purpose error handler 'Usage: 'If Err <> 0 Then Call zErr(sApp,sMod,iLine,Err) 'Where: 'sApp = a string identifying the application 'sMod = a string identifying the function or sub in which the error occurred 'iLine = the line number on which the error occurred 'Err = The Error object Dim iErr, sErrDesc, sErrSrce 'Store the details from the error object iErr = oErr.Number sErrDesc = oErr.Description sErrSrce = oErr.Source 'Reset the error object Err.Clear 'Log the Error details to the event log Call zGen_LogError(sApp, sMod, iLine, iErr, sErrDesc, sErrSrce) 'Put more error handling code here if required End Sub '========================================