PRA: Using DOWN ARROW After Declaring Function Omits EndArticle ID: Q141610Creation Date: 20-DEC-1995 Revision Date: 17-DEC-1996
The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
After you type the name of a new function or Sub procedure in a module,
such as Function myfunc(), Microsoft Access does not automatically generate
an End Function or End Sub statement for your new function or Sub
procedure. If the module already contains code, that code is visible on the
same page following the newly declared statement.
CAUSE
You are pressing the DOWN ARROW key to go to a new line after you type the
function name instead of pressing the ENTER key.
RESOLUTION
You can use either of the following methods to work around this problem.
Method 1
View the module in full Module view. To do so:
Always use the ENTER key to go to a new line when declaring a function or
Sub procedure. If you have started a function or Sub procedure and pressed
the DOWN ARROW key, you must type the End Function or End Sub statement at
the end of your code.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and
MORE INFORMATION
Steps to Reproduce Problem Function MyFunc() Function MyFunc()
End Function Microsoft Access did not generate an END Function statement for the MyFunc() function, and the IsLoaded() function is visible in the module. |
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.