Open report based on multiple criteria

I have a report that opens based on a drop down box. Basicaly you select the name in the box and press a button and it will open the report with the related data.

DoCmd.OpenReport "CloseOutRep", acViewPreview, , "[Estimator]= '" & Me.txtEstimator & "'"

The user wants to narrow the reports down by adding two more combo boxes - txtLocation and txtYear. How can I open this report with the additional criteria of

"[Location]= '" & Me.txtLocation & "'"
"[SalesYear]= '" & Me.txtSales & "'"

I guess all criteria has to be true for the report to display data and then all I need is a way to make Access assume all records should be displayed when one criteria or another is not chosen.

Sponsored Links:

Related Topics

Report based on query that has criteria based on listbox
I'm trying to get a report to load that is based on a criteria which is set according to the value of a listbox on a form. (all in 2007) When I open the report (by clicking on button) Access asks for the parmeter [which is the listbox.value]

The report will run fine if I enter the correct value but I don't want it to ask.

this is the format of the criteria in the query:
[Forms]![frmMain]![lstPRRListing] The listbox does have a value when the report is opened and the form is never closed.


Query criteria based on a form field
I am trying to open a report from a form using data from a field on the form as the criteria for the report query. I will try to explain.

I can get the report to open when the form field reads a single criteria like "Cross Country". My problem comes when I try to get the report to open when the field says Varsity Soccer or JV Soccer.

If I put *soccer* directly in the query criteria the report opens. If I put *soccer* in the form field and then get the query to read the criteria from the form, the report will not open.

I have also tried "Varsity soccer or JV soccer" in the field and it still does not work.

What other wording can I use to get all the Varsity soccer and JV soccer names to open in the report? Or what other approach should I use?


Issue in copying the report.
I created a report based on a query and it works fine. Then I need another report based on another query. I copied first report and changed the record source. Both queries are same just differing by one criteria.

When I open the second report, it ask to enter date. Why? I can create a new report but want to learn from where it is affecting.


List Boxes with Multiple Criteria
I have a unbound list box based off of a table in a form to pull criteria for a report. The have it set up to select multiple selections (multi select under other tab is at simple).

It allows you to pick : Not a Prospect or Priority or Secondary or All three of them. I have this in the query criteria:

[forms]![frmTopProspectReports]![lstPriorityLevel]

My issue is that if I select more then one let say Priority or Secondary only the Priority comes back in my report.


Query with Multiple "OR" Criteria no longer works
I created a query for a commission report, that uses multiple lines of criteria to define a salesman's terrory. The criteria involve several states or countries and each has exceptions (example, COUNTRY = Brazil and Rep ID 123, OR COUNTRY = Argentina and Customer ID 5678).

The report tested fine and was run for 2 months successfully. Now suddenly the report returns no records. If I remove the multiple criteria (the "OR" lines) and select one criteria at a time it does return records.


Generating Report Based on Multiple Criteria
I would like user to be able to select criteria from the table on which he wants to report on. But since some of the criteria are always the same they shouldn't repeat as it currently does.

I.e. instead of my current form displaying everything line by line, I only want user to select under Platform BA, BB, BC and BD under Medium - Cube, Circle, Triangle.

and so on. I obviously need many more tickboxes. on the other hand if there is a better way I am more than interested.


Totals Query for Report
I'm trying to create a report that counts time records per month. I've created multiple queries that counts the records within certain time frames (which I will combine into a Unionquery.which is the only way I can figure out how to do it, which I will then use for the report).

My question is how would I word multiple criteria in the queries.

62448 Hours

The ones with one criteria I figured out but not the ones with multiple criteria.


Set report criteria in code?
I am trying to use Stephen Lebans report-to-pdf tool, which uses the report as a parameter. I need to specify a criteria for the report, like I do when I open the report for printing:
DoCmd.OpenReport strReportName, acViewNormal, , strReportParam

I don't see how to set report criteria in the report-to-pdf tool, but if I can set the criteria before I use the tool, that should work.


Filtering a Report
I will never again put ACCESS on my resume.serves me right for lying…

I am currently lost with what should be the easiest thing.

I have a report, based on a query, that is opened through an "open report" button on a form. This form also includes 2 filter criteria: "client" and "date" The appropriate criteria is setup on the query so that when I fill in these blanks, the report opens up nice and filtered.

However.

What if I ONLY want to filter by ONE of these criteria, e.g date, leaving the other one blank? And vice versa? or what If I want to leave both blank, and just open the report with no filters? Is there a way to do this?

I tried having two buttons to open two duplicate reports, one with and one without filters. This is most likely not the most efficient way, but it works. However, it only works with one filter. I need 2, possibly more.

One more thing. The DATE criteria is entered by specifying a start date and an end date. So if I want to look up the records for March, I'd select the first and the last day of march.Ideally, but not necessary, I would like to have 2 dropdown lists, one with the 12 months and one with a list of years, and filter it that way.


E-Mailing Report
So I have done things like this, but never this exact scenario and cannot figure out how to design it. I have a report that is displaying a department, and a list of students who meet X criteria in that department. What I want to do is this:
E-mail the report to the department where students are meeting X criteria. But not the entire report, just the list of students that actually belong to that department.
Right now I have my query built to select the data I need based on the criteria, and I have the report based on the query. But for some reason I cannot wrap my head around where to go from here.


E-mail Selective Report
So I have done things like this, but never this exact scenario and cannot figure out how to design it.

I have a report that is displaying a department, and a list of students who meet X criteria in that department. What I want to do is this:

E-mail the report to the department where students are meeting X criteria. But not the entire report, just the list of students that actually belong to that department.

Right now I have my query built to select the data I need based on the criteria, and I have the report based on the query. But for some reason I cannot wrap my head around where to go from here.

Just an here is what my selection query looks like


Report with 3 criteria
I am trying to open a report base on 3 criteria as follows:

DoCmd.OpenReport "rpt_sumReadmissionDate", acViewPreview, , ("[Source]' Non-Collaborative Facility' And [CurrentAdmit]-[DischargeDate]>2 And [Home]'Yes'")

The first two criteria work fine but when I added the third criteria hundreds of records dropped form the report although majority of the records in the database meet all three criteria.

I'm not sure what I am doing wrong of if access allows for 3 criteria.


Opening a report with search criteria through a combo box
I am trying to open a report with search criteria through a combo box with the criteria. I have been struggling with it. The report is called Single Project Details Report.

It is based off a query called Single Project Details Query. The criteria is placed on the LAV Code section on the Query. I would like the combo box to be on a form called Marketing Projects Home.

I have struggled with it in several different ways. I do not have a programming background. I have switching the query criteria for search to [forms]![Marketing Projects Home]![combo2] and lots of different variations that I have found online. None seem to effect the search at all.

I have been mostly approaching it as affecting the search criteria for the query from the combo box and opening the report after update of the combo box.


Opening one form based on 2 criteria in another form
I have a general form that contains patient information. In this form I can | scroll through different exam dates for a particular patient. I need to be |
able to open a second form (for editing) based on two criteria, patient ID | and exam visit date.

I have used open args before to open a form when only one criteria was being | passed, howeverm, I can't figure this one out.


Fields showing in report based on form criteria
I understand how to make a report base on a query. I typically create a form to enter the criteria in to the query and open the report from a button on the form. However, sometimes I would like to keep some fields out of a report.

So, for instance if I have a table for example with the fields: name, address, age, sex, etc and I have a report that reports all of the fields of the table, I would like to be able to use my form that enters the query criteria for the fields and possibly have tick boxes beside each field on the criteria entry form so you can choosewhich fields show on the repot.

So if I only want to report names and ages I could enter "john" in the name box on the form and check the box beside it and possibly leave ages blank and check the box beside it so my report only show people named John along with their ages.

I was thinking this would be way better than creating a report for everypossible search option you would want to do for the specific table.


How to make multiple criteria query when sometimes the criteria can be blank
I am pretty new to Access (first project)

1. How do I do this with multiple criteria? Also, if I add multiple criteria, is it okay if sometimes some of those criteria are left blank?!

2. How can I make a date range a criteria?


Filter multiple criteria
I have a filter on a form based off of multiple criteria. Once you put the criteria I have a command button to search for this criteria based on what you put in the unbound fields. Once the filter is placed it is outputting the correct information but I want it th order by the launch date in descending order.orderby = "[launch] desc". I guess I am placing the event on the incorrect event. Do I put it on the form or the text box and what event?


Search Filter
I have multiple unbound text/combo fields in a form. Once you input your criteria I have a command button that when you click on it based on your criteria it will return a list of customers in your text field. I have command button to scroll through the list and a check box next to it to select a various customer you would like to print out on a report. My problem seems to be when multiple users are in this form it is not clearing out the previous user’s selections.


How To Open A Subform Based On A Criteria
Basics: I'm running a SQL server 2008 R2 back end with an Access 2007 Front end.

I need to find a way of opening up a main form and one of several possible sub forms depending on a criteria. A more literal way of putting it is
I'm trying to, based on an on click open up a form and also open up a sub form within that form based on state. We have a main table and several other tables that contain information based on state. The main form will be based on the main
table and holds our ID# and State. What I need to do is be able to open a states
table in the sub form based on what state is listed in our main table.

Is
there a query I can create that will do this using Joins between all the different state tables?


Selecting multiple criteria in a report in Acc 2007 using a form
How can I select multiple criteria using a form to generate a report in Access 2007.