Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Search in Access

Posted on 2013-01-28
3
Medium Priority
?
320 Views
Last Modified: 2013-02-18
I have a form in MS Access. I need to add a search button on this form. The Search can be done on Five database Fields. If Found, I need a report display the results fitting the criteria.
How to achieve that?

Thanks
0
Comment
Question by:ramziabk
[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
  • 2
3 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 38826243
Create a form with the textboxes for your creteria and a button to open your report.

In your report's design, click ... next to the recordsource property.

In the query designer, enter criteria similar to the following for each field that needs to be filtered on:

Forms!YourFormName!YourTextboxName

Place the following VBA code in the click event of your command button:

Docmd.OpenReport "YourReportName", acViewPreview


(You'll have to subsitute your actual report, form and field names for all of these)
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 38826254
These articles all show methods of doing what you are asking... and include sample databases:
http://allenbrowne.com/ser-62.html
http://www.accessmvp.com/kdsnell/SampleDBs.htm
http://www.access-programmers.co.uk/forums/showthread.php?t=114735

From the questions you have posted so far, it sounds like you are very new to Access... so digging into sample databases to see how these things work might help your learn and apply the concepts to your own database.
0
 
LVL 10

Expert Comment

by:deviprasadg
ID: 38826287
video tutorial on the same topic: http://www.youtube.com/watch?v=CTiA_4Me0cI
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

705 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