Article ID: 120912
Article Last Modified on 1/19/2007
In Access versions In version 7.0 and Access 97 1.0, 1.1, and 2.0 ------------------------------- ------------------------------ Where: Match Whole Field Search: All Search In: Current Field Match: Whole Field Match Case: <clear> Match Case: <clear> Search Fields As Formatted: <clear> Search fields as formatted: <clear> Direction: Down Search only current field: <checked>
In version 7.0 and Access 97 ------------------------------ Search: All Match: Whole Field Match Case: <clear> Search fields as formatted: <clear> Search only current field: <checked>
In version 7.0 and Access 97 ------------------------------ Search: All Match: Any Part of Field Match Case: <clear> Search fields as formatted: <Not Available> Search only current field: <clear>
In version 7.0 and Access 97 ------------------------------ Search: All Match: Start of Field Match Case: <clear> Search fields as formatted: <clear> Search only current field: <checked>
In Access 97:
SendKeys
Keystrokes: %ha%n
Wait: No
RunCommand
Command: Find
In Access versions 2.0, 1.0, and 1.1, and in version 7.0:
SendKeys
Keystrokes: %ha%n
Wait: No
DoMenuItem
MenuBar: Form
MenuName: Edit
Command: Find
This macro can then be assigned to a command button, to a button on a form,
or to an event on a form. When you run this macro, the Find dialog box appears with Any Part Of Field selected in the Match box (or Where box in versions 2.0, 1.0, and 1.1). The keystrokes sent by the SendKeys action are:
Option Setting Keystrokes ----------------------------------------------------------- Match Any Part of Field %ha Match Start of Field %hs Search Only Current Field <cleared> %e Match Case <selected> %c Search Fields as Formatted <selected> %o Search Up %ru Search Down %rdIn Access versions 2.0, 1.0, and 1.1:
Option Setting Keystrokes ----------------------------------------------------------- Where Any Part Of Field %ha Where Start Of Field %hs Search In All Fields %l Match Case <selected> %s Search Fields As Formatted <selected> %o Direction Up %uYou can combine these keystrokes to make multiple selections. For example, the following actions open the Find dialog box with Start Of Field selected in the Match box. Then, the actions clear the Search Only Current Field box (or select the All Fields option in version 2.0). And then the actions select Up in the Search.
In Access 97:
SendKeys
Keystrokes: %hs%e%ru%n
Wait: No
RunCommand
Command: Find
In Access versions 2.0, 1.0, and 1.1, and version 7.0:
SendKeys
Keystrokes: %hs%e%ru%n (%hs%l%u%n in version 2.0 and 1.x)
Wait: No
DoMenuItem
MenuBar: Form
MenuName: Edit
Command: Find
Additional query words: inf
Keywords: kbhowto KB120912