Solved

Search Field in Access

Posted on 2011-02-25
6
508 Views
Last Modified: 2012-05-11
I have a form setup for my contacts. At the top, i have a search field. When i start typing, it will search for the first field, "Contact Name". I have three columns on my search: "Contact Name", "Address" and "Business Phone". How do i setup my search field to look all three columns. For example, if i have a contact who's name is John, his address is 123 Test Drive and his phone number is 999-999-9999, from the search field i can start typing any of those things and it will find him. Does that make sense? How do i set that up in my search field. I attached a screenshot. Thanks!
Search-Fields.bmp
0
Comment
Question by:tols12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:tols12
ID: 34982358
Here's what the query builder looks like for the search field. Can i just modify this?
Query-Builder.bmp
0
 
LVL 31

Accepted Solution

by:
Helen_Feddema earned 500 total points
ID: 34982390
You might want to consider an alternate approach, one combo box per search value.  See my Fancy Filters database for an example.  Here is a link for downloading it:
http://www.helenfeddema.com/Files/accarch129.zip

And here is a screen shot of the form:

Fancy-Filters-Form.jpg
0
 
LVL 2

Expert Comment

by:ComputerAidNZ
ID: 34982548
If you really MUST do what you are asking, the way I have accomplished this in the past is by creating a temporary table with one field holding contact name, phone and address data, either by concatenation, then wildcard search would find any string as entered in any part of the concatenated field.  If this approach is unfavourable, then (assuming your table has say 100 records in it), fill a field in a temporary table with data from contact name, then add data from address, then add data from phone - ending up with 300 records and then you search from this query and locate the record using the key field.  Complicated, but worked well for me in the past.
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 2

Expert Comment

by:ComputerAidNZ
ID: 34982569
continued...

Your query at the top of the form would be based upon the data from the temporary table created.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34982579
<No Points wanted>
IMHO, the "One combobox to rule them all" search design is over-rated.

It can just make searching more confusing for users, as they may not be sure if it is searching one field or more than one field.
If they can type 3 terms and it will search 3 fields?
Can they use Wild Cards?
If it searches with AND or OR logic.
...etc

Finally, it is just too much work (IMHO)  to design the interface...

JeffCoachman
0
 

Author Comment

by:tols12
ID: 34982629
Thanks for all the honesty boaq2000! I will probably just create three search fields. Thanks!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question