ACC97: Using Lightweight Objects in Microsoft Access 97ID: Q159827
|
Moderate: 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:
Q175066 ACC97: Microsoft Access 97 Sample Forms Available on MSL
Microsoft 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:
Form: MySwitchboard
--------------------------------------
Caption: Main Menu
Command button:
Name: OpenEmp
Caption: Employees Form
HyperlinkSubAddress: Form Employees
Label:
Name: OpenCat
Caption: Catalog Report
HyperlinkSubAddress: Report Catalog
Image:
Name: OpenSales
Picture: C:\Windows\Circles.bmp
PictureType: Embedded
SizeMode: Clip
PictureAlignment: Center
PictureTiling: No
HyperlinkSubAddress: Query Category Sales for 1995
For 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
Keywords : FmsProp FmsHowto
Version : 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 20, 1999