How Do I Change The Atrtibutes Of The "Find And Replace" in Access

  • Thread starter Turbine Mechanic
  • Start date
T

Turbine Mechanic

I built a database for our MSDS program were I work. One of the features that
the employees don't like is when they open the "Find and Replace" dialog box.
The search parameter defaults to "Whole Field". I would like it to default to
"Any Part Of Field" so they can search for any part of the name of an MSDS
file. Is there any code to make it default to "Any Part Of Field"? Below is
the code for this "Search"

Thanks,

Dave


Private Sub Search_Click()
On Error GoTo Err_Search_Click


Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Search_Click:
Exit Sub

Err_Search_Click:
MsgBox Err.Description
Resume Exit_Search_Click

End Sub
 
A

Allen Browne

Try changing the setting under:
Tools | Options | Edit/Find | Default Edit/Find Behavior

Programmatically:
Application.SetOption("Default find/replace behavior") = 2

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
K

Kathleen

OK - this info is exactly what I need as well - but I'm a newbie with this
and don't know where to put this code.

I want the default behavior to change each time my DB open - so I could
attach it to the "On Open" event for my main form.......but do I use a macro,
an expression, what????? Help please.

Kathleen
 
D

Dr. Know

Kathleen said:
I want the default behavior to change each time my DB open - so I could
attach it to the "On Open" event for my main form.......but do I use a macro,
an expression, what????? Help please.

Kathleen

Put this in your VBA code:

Application.SetOption "Selection Behavior", 1

Other settings are 2 and 3

FWIW,

Dr. Know
 

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