473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Find - Search - Match: Any Part of Field

Is there any way to change the default search to "Any Part Of Field"
instead of whole field? The first thing I ever do when searching for
something in a field is change the default setting from "Whole Field"
to "Any part of field" because that way I don't have to key in the
entire word I'm searching for. It is especially frustrating having to
explain this to all of the people using my database. Any help would be
appreciated. Thanks.

Nov 13 '05 #1
11 9074
Change the setting under:
Tools | Options | Edit/Find
setting Default Find/Replace to General Search.

If you want to do this programmatically in your startup code:
Call SetOption("Default Find/Replace Behavior", 1)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Pete" <so**********@netzero.net> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Is there any way to change the default search to "Any Part Of Field"
instead of whole field? The first thing I ever do when searching for
something in a field is change the default setting from "Whole Field"
to "Any part of field" because that way I don't have to key in the
entire word I'm searching for. It is especially frustrating having to
explain this to all of the people using my database. Any help would be
appreciated. Thanks.

Nov 13 '05 #2

Pete wrote:
Is there any way to change the default search to "Any Part Of Field"
instead of whole field? The first thing I ever do when searching for
something in a field is change the default setting from "Whole Field"
to "Any part of field" because that way I don't have to key in the
entire word I'm searching for. It is especially frustrating having to
explain this to all of the people using my database. Any help would be
appreciated. Thanks.


Are you letting people browse the raw data? Bad idea. Build a front
end GUI and connect to a back-end that's hidden from the users.

So, maybe you have a from in Continuous view or somesuch, and the user
is right-clicking on a column to search?

Build a proper search form. The way I do it is to split the form into
two, with the top part containing a bunch of unbound text boxes, check
boxes, combos etc. for the user to build his/her criteria for the
search. The top part also has a button marked "Search", and when the
user presses it code runs to build a query based on the criteria
supplied. You can then automatically pre- and ap-pend wildcards to
text values, combo values (if you're not using system-generated PK and
FK values, natch) etc. You'll also probably want a "Clear" button to
reset the search. The lower half of the form contains a subform to
display your data.

HTH

Edward

Nov 13 '05 #3

Allen,

I wanted to say Thank You! This has driven me crazy for months. With
every new employee I have to train them to move from the "Whole Field"
to "Any Part..." behaviour. I am very appreciative of your post. I
added this successfully to my switchboard and all the other forms work
great!

Peace,
Joseph

Nov 13 '05 #4
Allen,

Maybe spoke too soon...I rolled out the updated DB this morning.
Already within the first 15 minutes folks have noticed the defaults
have changed and I might have traded one problem for another. Turns
out people called to my attention that while the "Match" now shows up
with "Any part..." but the "Look In" option refers to the entire form
now instead of just the selected field. The drop-down does have the
option to change it to the field, and once that's done the first time,
all subsequent uses of Find|Search in that opened session of Access, on
any form, remain field specific. However it resets when Access is
closed. Is it possible to set that default as well?

Thanks,
Joseph

Nov 13 '05 #5
I'm not seeing that issue.

Using Access 2003, the Find button on the toobar defaults to the specific
field where the cursor is, unless you call it from something like a command
button. If that's what is happening, Screen.PreviousControl might help.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<te********@hotmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...

Pete wrote:
Is there any way to change the default search to "Any Part Of Field"
instead of whole field? The first thing I ever do when searching for
something in a field is change the default setting from "Whole Field"
to "Any part of field" because that way I don't have to key in the
entire word I'm searching for. It is especially frustrating having to
explain this to all of the people using my database. Any help would be
appreciated. Thanks.


Are you letting people browse the raw data? Bad idea. Build a front
end GUI and connect to a back-end that's hidden from the users.

So, maybe you have a from in Continuous view or somesuch, and the user
is right-clicking on a column to search?

Build a proper search form. The way I do it is to split the form into
two, with the top part containing a bunch of unbound text boxes, check
boxes, combos etc. for the user to build his/her criteria for the
search. The top part also has a button marked "Search", and when the
user presses it code runs to build a query based on the criteria
supplied. You can then automatically pre- and ap-pend wildcards to
text values, combo values (if you're not using system-generated PK and
FK values, natch) etc. You'll also probably want a "Clear" button to
reset the search. The lower half of the form contains a subform to
display your data.

HTH

Edward

Nov 13 '05 #6

Thanks for the followup Allen.

First, I'm Access XP.

Second, I've tested it from all three places (the toolbar button, using
Control-F, and the custom button included on the form).

All three methods behave the same.

I verified the code of my custom button on the form and it reads:

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

When I tried your suggestion, I encounter the Run-time Error 2483
(can't move focus to a previous control when only one control has had
the focus). I immediately removed it.

As I had mentioned, I initially placed the other code you suggested on
my Switchboard form and it affected all forms appropriately. So I
naturally went there to place the additional code suggested now. Maybe
I should try some where else. You had said in "the startup" code, but
I don't have any per se. At least, I don't think I do, which leads me
to think if I had it I would know about it and since I don't, I must
not. Maybe a recommendation then where to place a module that runs at
startup. Of course, I'd rather not place the code on each and every
form...unless that's necessary.

I appreciate your continued feedback.

Thanks,
Joseph

Nov 13 '05 #7
A second reply of sorts...

I've read more from MS website's online help tools and assistance
features, newsgroups, etc., and found more documentation about setting
these optons.

I've read the distinction of the fast (0), general (1) and start of
field (2) options.

However, and I'm probably not the first to point this out, let me point
this out...

http://office.microsoft.com/en-us/as...875061033.aspx

Article says:
"Select General Search to search all fields and match any part of the
field"

Why would we want to search ALL fields if we're looking for "ANY PART
OF THE FIELD"?

Certainly we don't need to search numeric fields, date fields, etc. for
text items and so on and so forth.

Not necessarily giving up, but wanted to share the irony with someone.

Looking forward to your help Allen. It is appreciated.

Thanks,
Joseph

Nov 13 '05 #8
Believe it or not, I'm making progress.

Here's what I began doing - adding "SendKeys" command through the
command button on the form.

Here's the code:
==============================
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{A}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{-}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("{BACKSPACE}")
==============================

The default search I'm using now is back to the "Fast" (option 0)
instead of "General" on the Switchboard. These keys basically move the
user through the Find & Replace box to each option and changes it from
"Whole Field" to "Any Part..." on Match and unchecks "As formatted..."
then returns the curson to the criteria box.

Now this is only working through the "Find" command button on my form,
not the Control-F or toolbar button.

I think in order to re-train the users, I need to consider breaking the
habit of using either Control-F or the toolbar, and guiding them to
only using the form button. If I wanted to consider removing those
from appearing in the toolbar, drop-down, etc., how would I go about
that? Or, if I do that, does it impact the overall functionality of
"Find"?

Thanks!

Peace,
Joseph

Nov 13 '05 #9
You are aware of the SendKeys bug where it messes with the state of Num
Lock?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<jk****@earthlink.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Believe it or not, I'm making progress.

Here's what I began doing - adding "SendKeys" command through the
command button on the form.

Here's the code:
==============================
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{A}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{-}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("+{TAB}")
SendKeys ("{BACKSPACE}")
==============================

The default search I'm using now is back to the "Fast" (option 0)
instead of "General" on the Switchboard. These keys basically move the
user through the Find & Replace box to each option and changes it from
"Whole Field" to "Any Part..." on Match and unchecks "As formatted..."
then returns the curson to the criteria box.

Now this is only working through the "Find" command button on my form,
not the Control-F or toolbar button.

I think in order to re-train the users, I need to consider breaking the
habit of using either Control-F or the toolbar, and guiding them to
only using the form button. If I wanted to consider removing those
from appearing in the toolbar, drop-down, etc., how would I go about
that? Or, if I do that, does it impact the overall functionality of
"Find"?

Nov 13 '05 #10
No.

What is it?

Is there a patch?

-Joseph

Nov 13 '05 #11
When you use SendKeys, it can mess with the state of the NumLock, and no,
there is on patch to fix this issue, despite the fact that the problem is
now 10 years old.

Info about this bug:
http://www.mvps.org/access/bugs/bugs0004.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<jk****@earthlink.net> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
No.

What is it?

Is there a patch?

-Joseph

Nov 13 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: JoshuaF | last post by:
hello everyone i am very new to postgresql 7.3.3 and am using it on my mac G4 OS X and i am having some trouble which i hope you can help me out with some answers to my questions: 1.) How can I...
3
by: Eric | last post by:
Hi, I wrote a Sub to run "Find and Replace" menu command on Access 2000. It worked fine except SetFocus didn't work. It changed position from time to time. I need the Focus always set at field...
3
by: Liz Malcolm | last post by:
Hello and TIA for guidance. I am building a reusable search procedure (thanks go to Graham Thorpe for his example that set me on my way). Everything works up until the 2nd match is found, the...
3
by: jj | last post by:
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...
0
by: kkrizl | last post by:
I'm having a very bizarre problem. I open up my table in datasheet view, and I click on edit, find. In the Find and Replace dialog box, I enter an address (123 main for example). If I set the...
2
by: AA Arens | last post by:
When I place a record serch utility (vos the button placement wizzrd), I discovered that the Match setting is "Whole Field" by default. How to make "Any Part Of Field" default?
0
by: AA Arens | last post by:
The Find and Replace dialog box has several fields (tab: Find): Find What Look In Match Search Match Case and Search Fields... How to set the defaults in Match with VB I use dour different...
1
by: NEC | last post by:
I am using access 2000 and have a DAP that I created from a table. What I am trying to do is essentially create a find command that will search all records in the DAP based on user input. I have...
10
Shakss2
by: Shakss2 | last post by:
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.