ACC: Line Numbers Not Automatically Returned by Erl Variable (148358)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
This article was previously published under Q148358 SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
When a run-time error occurs in a Visual Basic for Applications user-
defined function with error handling in effect, the Erl() function returns
0 unless a line number is specified in the user-defined function.
This article assumes that you are familiar with Visual Basic for
Applications and with creating Microsoft Access applications using the
programming tools provided with Microsoft Access. For more information
about Visual Basic for Applications, please refer to the "Building
Applications with Microsoft Access for Windows 95" manual.
NOTE: Visual Basic for Applications (used in Microsoft Access version 7.0)
is called Access Basic in earlier versions.
RESOLUTION
You can return a line number in the Erl() function by specifying a line
number on or above the line that causes the error. The Erl() function
will return the line number currently in effect. You must specify a numeric
line number, not an alphanumeric line label. The Erl function() will only
return a line number. For an example of how this works, see the "Steps to
Work Around Behavior" section later in this article.
STATUS
This behavior is by design.
REFERENCES
For more information about Error handling, search for "Error handling," and
then "Error Trapping" using the Microsoft Access for Windows 95 Help Index.
For more information about the Erl() function, search for "Erl" and then
"Err, Erl Functions" using the Microsoft Access Help menu.
NOTE: There is no reference to the Erl() function in the Microsoft Access
version 7.0 Help.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbprb kbProgramming KB148358 |
---|
|