ACC95: How to Create a FindRecord Form MethodLast reviewed: August 28, 1997Article ID: Q139047 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. Microsoft Access version 7.0 now exposes the form module events, functions, and routines that have been created using Visual Basic for Applications. In earlier versions of Microsoft Access that use Access Basic, it was difficult to pass parameters to a form to allow searches, configuration, and so on. To do so usually involved setting the Tag property of the form or creating global variables to hold values. The new form module functionality in Microsoft Access 7.0 enables you to code specific rules and behavior directly into the form object, and enables outside OLE applications or other functions within the database to use these functions to perform tasks from the very simple to the highly complex. This article demonstrates a technique to enable a calling function to find a specific record on a form. This is done with a single call to a user-defined search function. The search function, defined in the form's code module, hides the complexity of the method used, which involves changing the focus, enabling and disabling a control, and using the FindRecord method. 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 the "Building Applications With Microsoft Access For Windows 95" manual. CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file or perform these steps on a copy of the Northwind database.
MORE INFORMATIONTo create the search function, follow these steps:
Keywords : JetFind kbprg kbusage PgmHowTo FmsHowTo Version : 7.0 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |