The information in this article applies to:
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
MORE INFORMATION
When you click Find on the Edit menu in Form view, the Find dialog box
appears with the following default settings.
You can alter these settings by invoking the Find dialog box with the DoMenuItem action (or RunCommand in Microsoft Access 97) using the SendKeys action to select alternate settings. For example, you can invoke the Find dialog box by using a macro with the following actions:
This macro could then be assigned to a command button, a button on a form, or to an event on a form. When you run this macro, the Find dialog box will appear with Any Part Of Field selected in the Match box (or Where box in version 2.0 and 1.x). The keystrokes sent by the SendKeys action are: ALT+H to select the Match box, "a" to select Any Part Of Field, and ALT+N to select the Find What box. The SendKeys action must come before the call to open the dialog box, even though it might seem that the call to open the dialog box should come first. However, if you place the call to open the dialog box first, the macro will run the RunCommand action and then wait for the dialog box to be closed before continuing to the next action (the SendKeys action), sending your keystrokes to the form. The following table lists which keystrokes to send to select various items in the Find dialog box. In Microsoft Access 97 and 7.0:
In Microsoft Access 2.0 and 1.x:
You can combine these keystrokes to make multiple selections. For example, the following actions will open the Find dialog box with Start Of Field selected in the Match box, will clear the Search Only Current Field box (or select the All Fields option button in version 2.0) and will select Up in the Search:
REFERENCES
For more information about the Find command, search the Help Index for
"Find," and then "Finding data using Filters" or ask the Microsoft
Access 97 Office Assistant.
Keywords : FmsHowto |
Last Reviewed: April 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |