DoCmd.DOMenuItem (Edit Menu)

J

Joe Cletcher

Is there a way to set the search method to "any part of field" instead of the
default method of "whole field" for the following command? The user has to
make the change manually after the "find" form opens--setting this so that
the user doesn't have to continually change the method is desirable.

DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
 
A

Allen Browne

Choose Options from the Tools menu.
On the Edit/Find tab, set:
Default find/replace behavior
to:
General Search

You can set this programmatically with:
SetOption("Default Find/Replace Behavior",1)
But from memory, that doesn't take until you restart Access.

A rather undesirable fudge is:
SendKeys "%ha", False
RunCommand acCmdFind
 
J

Joe Cletcher

Thanks, that will work.

Allen Browne said:
Choose Options from the Tools menu.
On the Edit/Find tab, set:
Default find/replace behavior
to:
General Search

You can set this programmatically with:
SetOption("Default Find/Replace Behavior",1)
But from memory, that doesn't take until you restart Access.

A rather undesirable fudge is:
SendKeys "%ha", False
RunCommand acCmdFind
 
A

Annette

Joe Cletcher said:
Is there a way to set the search method to "any part of field" instead of the
default method of "whole field" for the following command? The user has to
make the change manually after the "find" form opens--setting this so that
the user doesn't have to continually change the method is desirable.

DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
 
Top