Open report based on multiple criteria
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.
Thank you for taking the time to report an issue.
What's wrong... Please write below.
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.
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.
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?
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.
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.
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.
My question is how would I word multiple criteria in the queries.
The ones with one criteria I figured out but not the ones with multiple criteria.
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.
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.
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.