Customize Find

M

Melissa

Is there a way to set the defaults for the Find and
Replace form? I want to set the Match so Any Part of
Field is the default instead of Whole Field.
 
R

Raghu Prakash

Hi Melissa,

SUMMARY
This article describes how to set different default settings for the Find
and Replace dialog box in Microsoft Access 2000.
MORE INFORMATION
When you click Find on the Edit menu in Form view, the Find and Replace
dialog box appears with the following default settings:
Find What: <clear>
Look In: current field
Match: Whole Field
Search: All
Match Case: <clear>
Search Fields As Formatted: <clear>

To alter these settings, start the Find and Replace dialog box with the
RunCommand and use the SendKeys action to select alternate settings. For
example, you can start the Find and Replace dialog box by using a macro
with the following actions: Action Action Argument
------------------------------
SendKeys Keystrokes: %ha%n
Wait: No
RunCommand Command: Find

This macro can 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 and Replace dialog
box appears with Any Part Of Field selected in the Match box. The
keystrokes sent by the SendKeys action are as follows:
ALT+H to select the Match box setting
"a" to select Any Part Of Field setting
ALT+N to select the Find What box
The SendKeys action must come before the call to open the dialog box, even
though it may 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 runs
the RunCommand action and then waits 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 and Replace dialog box: Option Setting
Keystrokes
-----------------------------------------------------------
Match Any Part of Field %ha
Match Start of Field %hs
Match Case <selected> %c
Search Fields as Formatted <selected> %o
Search Up %su
Search Down %sd

You can combine these keystrokes to make multiple selections. For example,
the following actions open the Find and Replace dialog box with Start Of
Field selected in the Match box; select Up in the Search box; and set the
focus to the Find What box: Action Action Argument
------------------------------
SendKeys Keystrokes: %hs%su%n
Wait: No
RunCommand Command: Find

For Further Information: Microsoft Knowledge Base Article - 208923

Please let me know has this helped You...
Thank you...
Raghu...
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top