ACC: Form and Report Modules Are Public by Default (95/97)Last reviewed: August 28, 1997Article ID: Q140464 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. Microsoft Access has set the scope of procedures in form and report modules to be as consistent with object-oriented programming as possible. Variables in Microsoft Access class modules can be declared public, in order to be available to other objects in a database. You can refer to a form using a pre-declared identifier without the form having to be loaded into the Forms collection. This article shows examples of using pre-declared identifiers to refer to objects in a class module. 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 your version of the "Building Applications with Microsoft Access" manual.
MORE INFORMATIONThe following example demonstrates the scope of a function and a variable in a form module:
REFERENCESFor more information about scope, search the Help Index for "scoping levels," or ask the Microsoft Access 97 Office Assistant. For more information about class modules, search the Help Index for "class modules," or ask the Microsoft Access 97 Office Assistant. Keywords : kbprg MdlGnrl Version : 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |