Novice: Requires knowledge of the user interface on single-user computers.
SUMMARY
You can hide and show a subform by using a command button or toggle
button. This article shows you how to create either a macro or a sample
user-defined function that uses a command button or toggle button to hide
and show the Quarterly Orders subform on the Quarterly Orders form in the
sample database Northwind.mdb (or Nwind.mdb in Microsoft Access versions
1.x and 2.0).
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.
NOTE: Visual Basic for Applications (used in Microsoft Access 97 and
Microsoft Access for Windows 95 version 7.0) is called Access Basic in
earlier versions. For more information about Access Basic, please refer to
the "Introduction to Programming" manual in Microsoft Access version 1.x
or the "Building Applications" manual in version 2.0.
NOTE: This article explains a technique demonstrated in the sample
files, FrmSampl.exe (for Microsoft Access for Windows 95 version 7.0)
and FrmSmp97.exe (for Microsoft Access 97). For information about how
to obtain these sample files, please see the following articles in the
Microsoft Knowledge Base:
150895 ACC95: Microsoft Access Sample Forms Available in Download Center
175066ACC97: Microsoft Access 97 Sample Forms Available in Download Center