Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Microsoft Access Search


(!)

shanie00's Avatar
shanie00 shanie00 is offline
Member with 4 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Intermediate
22-Jun-2012, 04:41 AM #1
Microsoft Access Search
Hi there,

I'm hitting my head at a brick wall trying to do this. Basically I have created an Access Database and just want to create a search box that I can type in my query and it will search all records in the database and bring those up. I have googled and googled coming up with codes etc which I tried and nothing seems to work and i'm sure its not that difficult but I can't get anywhere with this. I have the database available to send. I would be so grateful for any help.

Many thanks,
Shane
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,651 posts.
 
Join Date: Mar 2005
Location: UK
22-Jun-2012, 06:40 AM #2
Shane, welcome to the Forum.
When you say "I can type in my query and it will search all records in the database and bring those up", do you mean search all the fields of all the records?
Or search a field of every record, which is the normal way this is done?
__________________
OBP
I do not give up easily
Mhouser's Avatar
Mhouser Mhouser is offline
Computer Specs
Member with 136 posts.
 
Join Date: Jan 2008
Location: USA
Experience: Advanced
22-Jun-2012, 06:56 AM #3
How I setup my Form to do searches:

Click search button
button has VBA code on it:
Me.Recordsource = "SELECT * FROM <query>"
Me.Requery
-- This will only show records in the form for the found data.
-- Tied to the query that is running the search function for you, query has to show all the same columns as the data in the form

have an Undo Search button
Me.Recordsource = <make it match the original source>
-- Will make it so can see all records again
shanie00's Avatar
shanie00 shanie00 is offline
Member with 4 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Intermediate
22-Jun-2012, 08:13 AM #4
Many thanks for your reply. Yes I mean to search fields in the database. How do I input that code you have said as I have tried with button and code but to no avail... I wonder if I could send you database... Basically I want it searchable by name, keywords and Counciller... so i'm not sure if this is three separate searches or one would be easier - those are the three key things in my database that I need to get results from. The reason I need it with search buttons etc is for ease of use for our users.

Many thanks,
Shane
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,651 posts.
 
Join Date: Mar 2005
Location: UK
22-Jun-2012, 08:26 AM #5
Well the name and the Counciller can be handled by Find Combo boxes or by unbound text field, the keywords would use an Unbound text field. So 3 inputs would be best, what fields would you want to search for the Key words?
The easiest way to achieve this is to set the Form's Filter using VBA code.
shanie00's Avatar
shanie00 shanie00 is offline
Member with 4 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Intermediate
22-Jun-2012, 08:31 AM #6
VBA code? ooops sorry not sure what this is? Any chance you could break it down by action - im using access on 2007 but can do it on 2003 if needs be. I've gone to insert button then right clicked then build event...? then pasted various codes in there for searchs and none that have worked. Sorry to be 'thick'!
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,651 posts.
 
Join Date: Mar 2005
Location: UK
22-Jun-2012, 08:42 AM #7
VBA code is the programming language behind Macros, it can be very complicated for a beginner, how quick a learner are you?
I have posted various versions of Search forms on the forum which I cna show you if you think you can pick it up from them?
shanie00's Avatar
shanie00 shanie00 is offline
Member with 4 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Intermediate
22-Jun-2012, 08:48 AM #8
Yes I would say fairly quick learner - definately willing to have a go... This is last bit I need now...
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,651 posts.
 
Join Date: Mar 2005
Location: UK
22-Jun-2012, 08:50 AM #9
OK, I will find you some examples.
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,651 posts.
 
Join Date: Mar 2005
Location: UK
22-Jun-2012, 09:03 AM #10
I might just as well show you this one by Allen Browne.
Note it has a Search button and a reset button.
Attached Files
File Type: zip Search2000.zip (23.0 KB, 55 views)
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑