Prev | Current Page 1709 | Next

Michael R. Groh, Joseph C. Stockman, Gavin Powell, and Cary N. Prague

"Access 2007 Bible"

Error
descriptions are usually short, but you want to provide as much space as possible to hold them.
A prototype of using LogError() is shown in the following subroutine. Notice that the
LogError() function is triggered by the subroutine??™s error handler. After the error is logged,
you handle the error by other code that may be needed.
Sub MySubroutine
On Error GoTo MyErrorHandler

Exit Sub
MyErrorHandler:
LogError(???MySubroutine???, Err.Number, Err.Description)

Resume
End Sub
The most critical items in the error log are the date and time, the error number, and the error description.
The procedure name is useful, but it has to be hard-coded for each procedure (subroutine or
function) you log with LogError().
Summary
This chapter has taken a quick look at the steps required to bulletproof Access applications. Although
it??™s true that entire books could be written on this important subject, the concepts presented in this
chapter will be adequate for most Access applications.


Pages:
1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721
Produkcja CD pozycjonowanie wykonawcy teksty nieruchomości w Białymstoku muzykunia na e