Re: Selections on Report



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.

.



Relevant Pages

  • Re: Using only one record
    ... A fairly simple way to do this might be to create a search form in Continuous Form view. ... The button runs an OpenReport, filtering the report to the primary key of the current record. ... I have a query set ... it is very cumbersome in selecting the one record to use for the ...
    (microsoft.public.access.forms)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • Re: Using only one record
    ... I would be entering a new customer ... query. ... an OpenReport, filtering the report to the primary key of the current ... Here's an example of how to make a search form: ...
    (microsoft.public.access.forms)
  • Re: Query criteria that isnt bound to a single form or report
    ... Megan, to make it flexible, leave the criteria out of the query. ... use the WhereCondition of OpenReport. ... Each form can then build its own critiera, and re-use the same report. ...
    (comp.databases.ms-access)
  • Re: Fields in Label dont give correct information
    ... You need to create a query based on tblRegEvent and tblRegPayment. ... -If your DCountis to count values in your report, ... half the time with very few errors (other than that label problem I had.) ... For example in the Room assignment on the report an idividual will be ...
    (microsoft.public.access.reports)