ACC97: Using Lightweight Objects in Microsoft Access 97Last reviewed: October 24, 1997Article ID: Q159827 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article describes the concept of lightweight objects and provides a technique to create a lightweight switchboard form in Microsoft Access 97 that uses the Hyperlink properties of form controls to open other objects in the database. NOTE: A demonstration of the technique used in this article can be seen in the sample file, FrmSmp97.exe. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q175066 TITLE : ACC97: Microsoft Access 97 Sample Forms Available on MSL MORE INFORMATIONMicrosoft Access 97 introduces the concept of lightweight forms and reports, which are objects that do not contain a class module. One advantage of lightweight objects is that they are smaller and typically load and are displayed faster than objects with class modules. Another advantage is that they help decrease the size of your database because they do not require storage space for a class module. Possible disadvantages of using lightweight objects is that they do not appear in the Object Browser, and you cannot use the New keyword to create a new instance of the object. When you create a new form or report, it is a lightweight object by default. Microsoft Access 97 only creates a class module for the object if you do any of the following:
You can convert an object with a class module into a lightweight object by setting its HasModule property to No, and then saving the object. Do so with caution, however, because once you save the object, its class module and any code it contains are deleted. By using the Hyperlink property of command button controls, label controls, and image controls, you can create a lightweight switchboard form in your database that does not use any Visual Basic code or macros. The following example creates a switchboard form that demonstrates the use of hyperlinks to open database objects:
REFERENCESFor more information about lightweight objects, search the Help Index for "lightweight objects." For more information about class modules, search the Help Index for "class modules," or ask the Microsoft Access 97 Office Assistant. For more information about the HyperlinkSubAddress property, search the Help Index for "HyperlinkSubAddress property," or ask the Microsoft Access 97 Office Assistant.
|
Additional query words: class lightweight bloat menu switchboard
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |