From: Trever B on
Hi,

Thanks in advance

I have a command button that does the following:-

Supplier_Name.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

When it opens the match is always match "Whole Field".

My question is how do I get the default to any part of field.

Thanks

Trev
From: andyc on

--
"Trever B" wrote:

> Hi,
>
> Thanks in advance
>
> I have a command button that does the following:-
>
> Supplier_Name.SetFocus
> DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
>
> When it opens the match is always match "Whole Field".
>
> My question is how do I get the default to any part of field.
>
> Thanks
>
> Trev

Tyy this


Supplier_Name.SetFocus
SendKeys "%HA", False ' see notes
RunCommand acCmdFind ' see notes

notes: it is NOT recommended to use send keys if you are not shur that the
form and window that you are on will mainairn focuse. It can and will send
keys to a different application. BUT using the menu item tools-options-find
replace has never worked for me the send keys always have with no problem.

The RunCommand acCmdFind was added to ms access but the wizzard never got
changed from DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
both do the same thing.

Hope this helps