Re: Selections on Report
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Tue, 16 Jan 2007 09:26:13 +0900
The idea is to leave the criteria out of the query. Instead, build the string to use as the WhereCondition of OpenReport, so the report gets limited that way.
If the report is based on a Totals query, you can use this technique on the fields that have Group By in the Total row in query design. You can't use it for the fields that have Where in the Total row in query design. If you need to be able to do that, you can either use a mix of both techniques (the WhereCondition for the Group By fields, and the query parameters for the Where fields), or you can build the entire SQL statement in the Open event of the report, and assign it to the report's RecordSource.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"AccessQuestions via AccessMonster.com" <u30633@uwe> wrote in message
news:6c53691249878@xxxxxx
So if I want it in a report. Do i just need a report based on the query? Or
do I still need to use the form in some way?
Allen Browne wrote:Take a look at this example:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
There's a downloadable example that shows how to make a search form like
that. The procedure is exactly the same for a report. The difference is that
instead of applying the Filter to the form, you use the filter strin in the
WhereCondition of OpenReport.
What I would like to do is be able to choose from a list of items before a
report is display. I know how to create a query and a report on a query.
However, how do I create a report that will allow be to select from a list
or
combo box so I don't have to remember the list.
.
- References:
- Selections on Report
- From: AccessQuestions via AccessMonster.com
- Re: Selections on Report
- From: Allen Browne
- Re: Selections on Report
- From: AccessQuestions via AccessMonster.com
- Selections on Report
- Prev by Date: Re: Concatenate and Null Values -- Features
- Next by Date: Re: query multiple records for a report
- Previous by thread: Re: Selections on Report
- Next by thread: Sorting and Grouping a Report from Checkboxes
- Index(es):
Relevant Pages
|