Topics Search

Open report based on multiple criteria

Open report based on multiple criteria
Views: 59
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:

More 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:


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.


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.