ACC: How to Move from Subform to Main Form Using TAB or ENTERLast reviewed: October 24, 1997Article ID: Q154893 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article demonstrates how you can press the Tab key or Enter key to move from the last control on the last record of a subform to a specified control on the main form. 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:
ARTICLE-ID: Q150895 TITLE : ACC95: Microsoft Access Sample Forms Available on MSL ARTICLE-ID: Q175066 TITLE : ACC97: Microsoft Access 97 Sample Forms Available on MSL MORE INFORMATIONBy default, Microsoft Access allows you to press the Tab key or Enter key to move the focus from one control to another on a form, according to the form's tab order. This includes moving to subform controls. However, Tab or Enter keystrokes do not move the focus from a subform control back to the main form. 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 is called Access Basic in Microsoft Access version 2.0. For more information about Access Basic, please refer to the "Building Applications" manual. CAUTION: Following the steps in this example will modify the sample database Northwind.mdb (NWIND.MDB in version 2.0). You may want to back up the Northwind.mdb (or NWIND.MDB) file, or perform these steps on a copy of the Northwind database. NOTE: In the example below, you can remove the line of code that uses the Requery method of the subform control if you are using version 2.0. It is there for compatibility with the form's Cycle property, which is a new feature in version 7.0.
REFERENCESFor more information about setting a form's tab order, search for "tab order in forms," and then "Change tab order in a form" using the Microsoft Access 97 Help Index. For more information about the Bookmark property, search on the phrase "Bookmark," and then view "Bookmark Property (Microsoft Access)" using the Microsoft Access for Windows 97 Help Index.
|
Additional query words: navigate programmatically
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |