Hi.
You won't be able to control these settings with VBA 4.0 code, which is what
Access 95 uses. (acMenuVer70 is for version 7.0, or Access 95, and
DoMenuItem has been deprecated since Access 97.)
To apply the search option in VBA code, use the DoCmd.FindRecord( ) method.
Use acAnywhere as the second argument of this method to search in any part
of the field.
However, it would probably be easiest if you just changed the default option
setting for Access. To do so, select the Tools -> Options menu to open the
"Options" dialog window. Select the "Edit/Find" tab. Select the "General
Search" option button at the top left of the window, then the "OK" button to
close the window. Access will continue to use your current setting that
you've already manually applied in the "Find And Replace" window (whether
it's "Any Part of Field," "Whole Field," or "Start of Field") for any future
search during your current session. However, the next time you open the
database in Access, it will use your new default "Any Part of Field" for
searches, so you won't have to apply it manually again.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
"jj" <jj@get2net.dk> wrote in message
news:41*********************@dread11.news.tele.dk. ..
Hi NG
I have a form, where I can activate the search and replace dialogbox when
pressing a button.
My problem is that the dialogbox opens with the default that it should
search for full match only, and I want it to open with default "a part of
field".
The VBA used is:
docmd.domenuItem acformbar, acEditmenu, 10, , acMenuVer70
How do I change it to default "A part of the field"?
Thanks in advance