?
Solved

Search Field in Access

Posted on 2011-02-25
6
Medium Priority
?
521 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
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 2000 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
Technology Partners: 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!

 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

850 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