Access Error Method Example
Access Error Method - You can use the Access Error method
to return the description associated with a Microsoft Access or DAO error when
the error hasn't actually occurred.
However, you can't use the Access Error
method for ADO errors in Visual Basic.
Application Object AccessError method Visual Basic example:
Function ErrorString(ByVal lngError As Long) As String
' begin Access Error method code
Const conAppError = "Application-defined or " & _
On Error Resume Next
If Err.Description = conAppError Then
ErrorString = AccessError(lngError)
ElseIf Err.Description = vbNullString Then
MsgBox "No error string associated with this error."
ErrorString = Err.Description
' end Access Error method code
Microsoft Access is a fully capable database and it's primary limitations is the number of concurrent users it will support. Generally, we recommend a limit of 10 to 15 users.
We create databases large and small. Some of our databases help run entire small businesses. We also handle unique businesses such as flyrod manufacturing, cheese making, marina management, and cable tv inventory.
You should use VBA error handling code in all of you VBA
modules, subroutines and functions. If you use global variables and you do
not have error handling in all subroutines then you will lose the values in your
global variables when an unhandled error condition happens.