Solved

Search in Access

Posted on 2013-01-28
3
301 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
  • 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 500 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

832 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