Solved

Create a form to filter data from a query (using multiple criteria) and generate a custom report.

Posted on 2016-09-20
4
28 Views
Last Modified: 2016-11-05
Hi!

I'm pretty new to Access so I'm not sure this is even possible. My goal is to create a form that enables users to filter data (using one or more criteria) and create a custom report.

I created a report that has college students' names,  student year, the subject they are enrolled in, and a grade for that subject. All this data is coming from a separate query and each student has one row and one class.  My report has about 300 rows (1 for each student) but I want to allow users to view fewer results in the report based on specific categories in the query. For example, it would be great if a user can use a form to select one or more subjects and just view a report for students enrolled in English and Math.
0
Comment
Question by:Access Newbie
4 Comments
 
LVL 19

Accepted Solution

by:
Eric Sherman earned 250 total points
ID: 41807813
Yes, that can be done but for an Newbie you may find it a bit challenging.

In summary ...
You would build list boxes on your search Form for all the criteria groups the user can filter on.  Then you would dynamically construct the select query base on what was selected in the list boxes.  

ET
1
 
LVL 3

Assisted Solution

by:bfuchs
bfuchs earned 250 total points
ID: 41807973
The way I do it some times, have user filter the form by filter by form/selection or whatever method, then use the following to open the report.

If Me.FilterOn = True And Len(Me.Filter) > 0 Then docmd.OpenReport "ReportName",,,me.filter

Open in new window

1
 

Author Comment

by:Access Newbie
ID: 41808846
Thanks so much! So I ended up using multiple combo boxes (in a form) for the subjects and called them different names, then created a filtering query in which I used all combo box names as the criteria as in [Forms]![FilteringForm]![combo box 1] or [Forms]![FilteringForm]![combo box 2] etc. And it works :)
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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
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…
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…
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now