Solved

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

Posted on 2016-09-20
4
41 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
[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
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 4

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

726 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