aceditmenu option to match any part of the field

G

Guest

The line
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
brings up the find dialog.
How can I automatically set the option Match 'Any part of field' withoud
clicking on it? (The default value is 'Whole field')
Can anyone help me?
 
A

Allen Browne

Go to:
Tools | Options | Edit/Find
and try setting:
Default find/replace behavior
to:
General search
 
G

Guest

Thanks Allen,
that did influence the behaviour of the default find dialog.
Just one 'but': each time when i start up my mdb and i click first on a form
field and then on 'find' the find dialog comes up with 'Any part of field'
(that's what i want) but now also with another 'Look in' field (not the one i
clicked on in the beginning....). So i must still correct first....
The next time i click on find ist behaviour is ok....odd?
 
A

Allen Browne

Yes, sounds odd.

I don't use that dialog, so have not seen this behavior.
What version of Access and service pack is this? (Help | About)
 
Joined
Dec 11, 2006
Messages
1
Reaction score
0
find parameter Match=Any....

Hello There,

Please have a look on the following site:
http://www.tkwickenden.clara.net/codeex/30.htm

You will find the following code to solve your problem:

Screen.PreviousControl.SetFocus
SendKeys "%ha%n", False
DoCmd.RunCommand acCmdFind


You will also find more usefull stuff.
All the best,
NGomes
 

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

Similar Threads

Error 2237 8
Find & Replace Box default find 1
vba coding 4
SetFocus Problems 2
Changing MSAccess "Find" options 1
Modify Search Button by using ComboBox 1
Comand Button 2
Duplicate Record with SubForms 2

Top